Lift the artificial logs out of your fireplace to access the burner assembly.
Locate the thermocouple clipped to the metal plate on the right rear of the tubular fireplace burner. The thermocouple is a thin rod with a tip protruding into the path of the pilot light flame. There are two wires connected to the terminals on the back of the thermocouple.
Turn the fireplace gas shut-off valve to the "off" position. Allow at least 1/2 an hour for the burner and thermocouple to cool down.
Mark the exact position of the thermocouple retaining clip holding the thermocouple to the metal plate behind the burner tube; use a light colored wax pencil or sharpened crayon to make the mark clearly visible.
Take a snapshot of the mechanism with a camera phone or digital camera; this will record the angle at which the thermocouple enters the pilot flame.
Slide the thermocouple retaining clip off the back burner plate. Make a mental note of the orientation of the two electrical wires connected to the terminals. Disconnect the terminals with a nut driver or screwdriver, whichever is applicable.
Swab the terminals on the end of the wires clean with a rag dipped in denatured alcohol.
Connect the wires to the replacement thermocouple terminals the same way they were disconnected. Tighten the retaining screws securely.
Slide the new thermocouple retaining clip back onto the burner plate and line it up with the mark made previously. Consult your snapshot and adjust the angle at which the thermocouple probe enters the pilot light by swiveling the thermocouple on its mounting shaft.
Replace the artificial logs. Turn the gas supply valve back on and relight the pilot flame. Wait 15 minutes for the thermocouple to warm up.
Turn the fireplace on to complete the installation.