If your car is prewired and you want the factory operation you will want to find or buy:
OEM Fog light switch for 2003-2008 Corolla, Matrix, Pontiac Vibe w/fog option
1 Fog Light Relay (Same 4 pin relay as horn, fuel pump, or A/C. I got like 25 for free at a junkyard from various Toyotas)
If your car is prewired and you want the independent operation you will want to find or buy:
OEM Fog light switch for 2003-2008 Corolla, Matrix, Pontiac Vibe w/fog option
1 Fog Light Relay (Same 4 pin relay as horn, fuel pump, or A/C. I got like 25 for free at a junkyard from various Toyotas)
Modify the OEM wires so the fogs come on independent from headlights (basically rewire the ground)
If your car is not prewired and you want to run the fogs close to factory:
You will need to wire the fogs using the provided switch, relay and wiring kit.
Note: Be aware that the wiring in these kits is generally garbage and on the Camry I had to basically make an entirely new wiring harness with thicker wire, a new relay (OEM Toyota 4 Pin) and inline fuse. The provided stuff melted on it's own and the upgrade has been fine since with the same configuration. Also the bulbs in those kits are garbage and will likely require almost immediate replacement.
I did this on my Camry and here is how I did it:
Relay:
Ground to red wires at the fog light switch
Output to fog lights
12V Fused constant from fuse box. You could also use the battery itself but I wanted to hide my wiring. Be sure to add an inline fuse to this wire.
12V switched from the low beam headlight via an add-a-fuse
Switch:
Note: If using a switched source from under the hood, the red switch wires will need to be extended significantly
2 red wires after splice to relay ground
Yellow wire not connected to anything
Black wire to chassis ground