1. The focus, the inner attention, has to be on the process of learning the action, not the desired action itself.That means that you have to learn how to learn.
If you develop good learning skills - you can apply those anywhere and everywhere - all your life.
If you look at a genius like Dean Kamen - a great inventor - you will see what I mean.
He is creative and simply doesn't give up.
All geniuses throughout history have shown some or all of the same skills:
creativity, an ability for lateral thinking, the ability to make connections between seemingly unrelated fields (of science) - and disrespect for authority.
Only by letting your mind wander to places that don't exist - by freeing yourself from the constraints society and/or peer pressure impose upon you can you really become creative and innovative.
In this case it's more important to un-learn constraining patterns of behavior than to learn new ones!
So where does pain fit in?
Learn to observe yourself - use Metacognition to identify situations, thoughts, habits, .... that aren't helpful. Start today.
Because if you learn to develop this crucial skill to it's full potential, you can use it - as stated above - anywhere, everywhere, anytime.
You have to realize that chronic pain is (mostly) a learned condition. The brain learned to be in pain all the time on it's own - what's called maladaptive plasticity.
But - by learning how to learn - and thus making use of "good" neuroplasticity - one can unlearn chronic pain.