like dchris said, it'd depend on where the pain is, but generally speaking back squats are actually really tough on your shoulders.
Front squats use far less shoulder. When you think about it, although the bar sits almost on top of them, it's really your upper back that's doing all the work. Your shoulders are pretty much just along for the ride (you can do front squats with your arms outstretched if you want).
Deadlifts may or may not be bad. Really, with shit like this it's just a case of finding out what hurts, and not doing that.