Is it permissible to leave a electric heated blanket on for use on Shabbos for the purpose of pain relief? 

It is permissible if when it is plugged in you are careful it doesn’t get unplugged. It is worthwhile to cover the part that is plugged in to remember not to unplug it. Also, cover the controls knobs.