I wonder if he's in any kind of pain, since he nips and yelps when you touch his back

The first thing I would do would be to take him to the vet and tell them what's going on with him, and to make sure he's healthy.
It's going to take some time for him to trust you. He may have been mistreated at his last home

Make your touching him a good thing by giving small treats when he allows you to handle him and touch his paws without nipping. Praise him a lot too, when he's good

Most of all, be patient
Good luck, I hope that he comes around with lots of love and TLC