Without seeing your form, it’s hard to determine what may have caused your problems. Typically, it’s your elbow that tends to react to the load if your form is incorrect, or, the weight is too heavy. Couple that with the force of gravity during overhead extensions, and, you may have a recipe for chronic pain.
In your case, I would avoid any triceps exercise where the weight is lowered behind your head. Additionally, I’d suggest you back off on the weight until you are pain free. I’d also suggest you try some overhead stretches and towel stretches as part of your warm up. Then, take a look at trying these exercises.
Standing Cable Triceps extension with a straight bar or rope. Keep your elbows by your side and press straight down.
Cable Triceps Kickbacks are another good exercise for avoiding extra pressure on the triceps. Just remember to keep your upper arm parallel to the floor when performing the exercise.
Reverse Grip Cable Triceps Extensions with a bar or one handle. This is a similar movement to the kickbacks, but, your body is vertical.