I would check the wireing, I had a similar problem with my windshield washer pump, would only work when the lights were on, turned out it was a rusted ground. Fixed it up, pump works as new. The ground was very cleverly hidden under the headlight.
xp
|