One movement that will help you achieve both is the old-timey "skin the cat" exercise. This movement allows for a great shoulder stretch through a full range of motion, decompresses the spine, and serves as a great core strengthener.
Note: Using rings or a TRX-style setup allows for more range of motion than using a bar. The rings let your shoulders move more naturally.
How to Do It:
- Start from a dead hang position with your hands turned out
- Keep your arms and legs straight and engage your lats and core as you flex your hips, bringing your thighs towards your chest
- Continue bringing your feet all the way through past your arms so that you go upside down
- Keep your core engaged as you lower your feet back towards the ground. Optional: Rotate the palms out for a greater stretch at the end of the movement
- Once you've come to a dead stop, bring your thighs to your chest and lift your hips back towards the ceiling
- Bring your feet through your arms so that you come back into a dead hang position with your palms turned out.
- Going over and back counts as one rep