You can prevent shoulder pain by maintaining good posture, using proper ergonomics when working at a computer or desk, and avoiding repetitive motions of the arm. If you play sports, use appropriate safety gear to protect your shoulder. Also, be sure to warm up before exercise and cool down afterwards.