The pectoralis minor (pec minor) originates from what's called the coracoid process of your scapula (d) and attaches at your 3rd, 4th, and 5th rib along the side of your ribcage. Its action is to depress the shoulder down and forward, like say when you're operating the mouse on your computer. To some extent the pec minor is supported in this action by the latisimus dorsi (lats). When these muscles become overly dominant, they can overstretch the rhomboid muscles in your upper back and lead to upper back pain.
The rhomboids help retract, or pull your shoulders back. But when weak or overstretched, they often go into spasm. So, a good massage strategy to relieve rhomboid spasm is to work on the pecs when treating upper back pain.
It's also important to have a good pec minor stretch to help open your chest up and take some tension out of your upper back. Trust me, this really works! Strengthening your rhomboids can also be a big help, but the key here is balance between pecs and rhomboids.
Set Up
I prefer to use a doorframe for this stretch, but you can also use a flat wall. Stand just a few inches away from the doorframe, with your forearm and palm against the frame. You want to have your elbow a few inches above shoulder height on the frame to best target the pec minor muscle--having your elbow at shoulder height isolates the pec major, but we're after its little friend here.
One way to make the stretch more effective is to take the opposite hand (hand not up on the door frame) and put it behind your back as if reaching for the opposite side rear pocket. This position prevents rotation of the torso and stabilizes the scapula.
The Stretch
From the starting position, step forward and out with the foot next to the wall. A good way to do this is to imagine you are against a flat wall and you're placing the side of your foot against the base of the wall. Then project your wall side shoulder and cheek forward as if you were going to place your ear against the same imaginary wall.
I recommend holding this position for no more than 30 to 45 seconds while taking slow, full breaths. Try and relax into this position and do not force it, as the muscles may try and counter by contracting. Repeat the stretch at least once more to get the most from the movement.
Additional Thought
Because most of us have a natural imbalance from side to side, you may want to stretch one side more frequently than the other. You'll know right away which side is the tightest with this stretch! For me, I tend to be tighter on my right side because I am so right hand dominant. You may find that's not the case with you but pay attention to the difference.