Do you have to have a masters degree before you get a Ph.D in psychology?

Typically yes. There are some schools that do have a combined masters/PhD.