I have an outlet at the pump area that the pump is plugged into, this outlet only recieves power when I switch it on. There is a switch directly on top of the outlet in a separate box. I ran a wire to the outlet box, and the hot one I pulled through the box and connected it to the switch, from the switch I went back down to the outlet box and connected it to the outlet. The other wire I have connected to the outlet. If you think about it, it is the same as wiring a light, except I used an outlet. So I could power it from the same outlet that the pump is on and it would thus recieve power only when the pump had power, ie. when the switch is on.