I've had problems with my shoulder for a couple of years, it kept dislocating and then I had surgery on it. One of the things I had to think about to improve my posture in my shoulders is really thinking about drawing my shoulder blades together.
At the beginning I had to practice it standing against a wall. Palms on the wall at shouldr height with arms out straight. Think about lifting your shoulders up, and then back. Finally take them down.
You should feel the muscles under and around your shoulder blades start to work. They are the ones that stabilize the shoulder and help a lot with posture.
Hope that helps