Begin by standing about 1 foot from the wall with your feet together.  Lean against the wall with your shoulder and bend your arm, keeping your elbow at the bottom of your ribcage.

With your opposite hand, press your hips toward the wall.  If you begin to feel some back or leg pain, stop and back off.  Slowly and rhythmically repeat this maneuver attempting to get a little farther each time.  Continue until symptoms abate or plateau.