I have a gas fireplace with a pilot light. The gas is turned on and off by a light switch on the wall. The switch stopped working and I have replaced it several times with a standard light switch I got at home depot. It works for a little while, and then seems to short out.

Am I using the wrong kind of switch? Or could there be a problem with the wiring?

Thanks for your help.