This is a problem we encounter periodically. Unfortunately, it's not a problem with a straight-line solution.
I took the time to do a comprehensive search of the forum, and collected the more useful and relevant threads. I will note that the most common cause I saw, for an electrical problem like yours that suddenly appeared was new wiring or changes by the power utility. But, it could also be changes YOU made to your house or pool.
I've posted the threads below, in the order of relevance. I recommend you read through the first three, at least. Then follow the elimination process in the first thread. If that shows nothing (ie, if the pool still shocks you with the mains off) it's time to call the power utility and get persistent.
"I would suggest you go back to square one. Turn off the main breaker to the house and see if you still measure a voltage - that will rule out your electrical system. If you still do, then turn the main on and all the other breakers off, is it there? If not, turn on one breaker at a time and take measurements. It might be an open neutral on one circuit or a ground/neutral reversal somewhere. "
http://www.poolforum.com/pf2/showthread.php/5460
"They finally called the electric company which discovered an issue with some ground wires in lines they had installed recently."
http://www.poolforum.com/pf2/showthread.php/15099
http://www.poolforum.com/pf2/showthread.php/13839
http://www.poolforum.com/pf2/showthr...al-Safety-Tips
Electrical bonding of swimming pools:
http://www.poolforum.com/pf2/showthread.php/14055
http://www.poolforum.com/pf2/showthread.php/5210
http://www.poolforum.com/pf2/showthr...trical-Bonding
Fixing broken bond wire
http://www.poolforum.com/pf2/showthread.php/15851
--------------------------------------------------------------
http://www.poolforum.com/pf2/showthread.php/19712
http://www.poolforum.com/pf2/showthread.php/7975
Bookmarks