Rats can be nasty pests; they find ways into seemingly impenetrable places, gnaw through most everything and multiply quickly. An electric rat trap sends an electrical current into the rat, effectively killing it.
Purchase a small animal trap. This is a wire cage with a trapdoor that shuts behind an animal after it enters.
Place a slab of sheet metal on the bottom of the trap, so that the entire floor of the mesh cage is covered by metal.
Put a dollop of peanut butter on the sheet metal near the back of the cage.
Attach jumper cables to the sheet metal at the back of the cage. The clips on the cables should just barely fit onto the edge of the cage.
Set the trap mechanism such that it is ready. Place the cage in an area known to be frequented by rats.
Attach the jumper cables to a 12-volt battery. Wait for a rat; once the rat goes into the cage, the trap door will shut behind it. The rat will be standing on the electrified sheet metal, which will electrocute it instantly.