That would depend on which parts of your shoulders are giving you problems. Is it the rotator cuffs, the actual deltoids, or bone/cartilage issues? Working out, by definition, is putting strain on your muscles, so you can't workout without putting strain somewhere - we just want to avoid putting it where it's not healed.
Leave it alone until it is fully healed. You will just have to build them back up after that. When I had a shoulder injury, I just focused on my leg workouts and a little arms depending on the exercise. Some things I could do without shoulder pain but it didn't leave much to work with. I'm actually lucky I didn't make things worse.
Was there any shoulder damage done when you popped it out? Rotator cuff, ligaments, strains, impingements? As long as there is no damage, starting with light loads of weight should be fine to start rebuilding your strenght. However, if you are still having pain, you may need to see a doctor/ physical therapist. There could be a more damaging injury that a surgeon or physical therapist can better direct you with.