Treatment for this is pretty easy once you've identified it as this. A physical therapist or a trained professional can perform gentle joint mobilizations to the neck, more specifically to the two vertebrae which are locked/impinged to loosen them up. Also you will want to retrain your neck muscles to find midline again without any deviations. Once you are aware that your neck is stronger, then you will want to slowly incorporate functional movements with keeping your neck muscles engaged and in midline while slowly incorporating shoulder strengthening so that you're whole system begins working together again.
Now your shoulder problem/pain should decrease. But remember, strengthening quickly does no one any good. Strength can take about 6-8 weeks to make a substantial change. And most of all, remember that your neck muscles are endurance muscles, so the exercises should be repeated at least 2-3 times a week just to keep them in check! =)