Heat for Tendonitis

Years ago I spontaneously dislocated my shoulder while swimming. I’ve had a sore shoulder since, and with a typing position it just exacerbates the soreness. I’ve gone to physical therapy for the tendonitis in the shoulder as well as had a cortisone shot. The therapy didn’t help much but the shot did; however every so often the shoulder starts getting sore and locking up again. I’ve found that a heating pad helps alleviate the pain, but a friend told me not to leave it on longer than 20 minutes because the fluid will start to build up and make it worse.

How long should I leave the heating pad on?
Curiously, why a moist heating pad? I don’t think I’ve hardly ever seen them anywhere..I have a regular plug in one that I use. And is it ice first and then heat or heat and then ice…I’ve gotten both responses here.