One end of a thermocouple on a gas stove connects to the pilot light, and the other end connects to the gas line. When the sensor wire connected to the pilot does not sense the presence of a flame, it turns off the gas supply coming into the stove. This safety feature ensures that no gas is flowing when there is no flame to burn it. Sometimes the thermocouple on a stove can malfunction and so must be replaced.
Locate the shut-off valve on the gas line that connects to the stove's flexible line. The shutoff should be fairly close to the flexible line. Turn the shutoff's handle completely clockwise to turn off the gas supply to the stove.
Open the oven door, and remove the racks and any other items from inside.
Remove the screws located at the corners and possibly the sides of the oven floor. Use a Phillips screwdriver to turn the screws counterclockwise. Lift off the oven floor once all the screws have been removed.
Locate where the gas line enters the stove and find the thermocouple connected to it. The other end of the thermocouple is connected to the pilot light assembly.
Unfasten both ends of the thermocouple, using an adjustable wrench to turn the fittings counterclockwise. Pull out the old thermocouple from the pilot light assembly and off the gas line.
Install the new thermocouple in the same location where you removed the old one. Stick the wire end into the pilot light assembly and tighten the fitting, using an adjustable wrench to turn it clockwise. Fasten the fitting on the other end to the gas line, and tighten the fitting with an adjustable wrench. Replace the oven floor and restore the gas supply to the stove.