Shut down all electricity to the area at the main circuit breaker panel box.
Pull sufficient wiring from the lamp and the hot side of the circuit box to work with. For experienced wire cutters, this can be as little as four inches, but for others six inches is easier to work with.
Expose about one-half inch of copper wire from all the wiring by stripping away the rubber insulation with a knife. You should have a black wire, white wire and green or copper-only wire from the lamp side, bundled together in a package. Remove about an inch of the rubber bundling the wires together before removing the insulation from the individual wires. The hot side also has a separate black wire, white wire and green or copper-only wire.
Unscrew or unclip the GFCI unit to expose the inside.
Slide each wire into the slot for it and lock it down by screwing on the mounting screw next to the slot. One side of the unit will be marked "hot" or "line." The black hot wire goes in the brass slot, the white wire goes into the silver slot and the green/copper wire goes into the green slot. Tug each wire after it is screwed down to ensure it is firmly attached.
Check to make sure that no portion of the copper wires from any of the wires are visible after installation. If you see some copper -- except for the green wire, which may be copper only -- pull that wire back out after unscrewing the connection and shorten the wire just enough so that when you put it back, in the copper is not seen.
Attach the three wires for the lamp into the corresponding slots on the other side of the unit the same way you attached the others.
Turn the power back on at the main breaker box and test the GFCI circuit by pressing the reset button multiple times. The unit should cycle back and forth between on and off with each press, with a blinking light signaling the off status. Turn the power off again once you determine it's operating correctly.
Tuck the excess wire into the circuit box and screw the GFCI unit into place. Screw or clip the cover on the box. Turn the power back on at the main breaker box.