How to Catch Rats?

There are humane rat traps which contain a box with a flap. Once the flap closes with the rat inside, the rat is not able to escape. You use something appealing to the rat, such as peanut butter to lure the rat in.