The following exercises for shoulder pain should be done in a pain free range and are just a general treatment without assessing what is the cause of your pain. Please seek advice from a professional.
Start on all fours. Have your hands on the floor directly under your shoulders so that you are nice and supported. Then slowly make as big a circle as you can with your shoulders. This wants to be done nice and slowly and with as much control as you can. Then once you have done 4 or 5 reps reverse the direction and go the other way.
Grab a broom handle. Have the hand of the painful shoulder furthest forward on the broom handle. Then use the other hand at the back (end) of the handle. Keep the arm that is painful as relaxed as possible so that you are not using any muscles in that arm. Then using the other arm as the driver push the broom handle in different directions taking the shoulder into different ranges of motion.
In a kneeling position with your hands under your shoulders and your knees under your hips take your right hand and slide it left along the floor and behind your left hand. Twist your body and reach it as far as you can. Hold there for a few seconds and then slide it back. Keep rotating back and go past the starting position and try to reach your right hand up to the ceiling and try to point your chest up to the ceiling as much as you can. Repeat 10 times with your right hand and then change over to the left.