I've had shoulder problems for most of my life. At one point, I could barely lift my arm to parallel to the ground. Various doctor visits didn't really do much for a permanent solution. (Cortisone shots and Voltaren gel work great for a short period of time, but they certainly don't do anything to fix the real problem.)
I bought a copy of
The Frozen Shoulder Workbook and started working through it. I came up with a warm-up routine that works for me: every time I do any upper body workout, I start with light (5 lb) dumbbell laterals, alternating sets with thumbs pointing up and thumbs pointing down, then move into the inner and outer elbow rotation exercises. I used to use the cable machine, standing, with the pulley set at elbow level, but now I actually prefer to grab a 5 lb dumbbell and lie on my side on a bench. I do 20 reps of outer rotation, then roll over, do the other arm, then switch the dumbbell to my other hand and do inner rotations, then roll over again and do the other arm. On shoulder day, I'll also use a band (I use the thin orange one from Elite FTS) and do various movements with it making sure to alternate palms up, palms down, each set. Being consistent with this has gotten me past a lot of pain and I have much better range of motion now.