Summarize:

When you leave the house for a long period, give your cat a treat. If your cat busies itself with nibbling its treat instead of darting out the door, your problem is solved. You could also give your cat a puzzle feeder on your way out in order to distract it from the fact that you're leaving. A puzzle feeder is a small device -- often a rubber ball or oblong shape -- with a small hole and hollow middle into which bits of kibble or cat treats are placed. The puzzle feeder gives the cat stimulation -- potentially for hours -- as well as a yummy snack. The puzzle feeder will keep it from running outside. There are many forms of entertainment available for cats, though not all will actually capture your particular kitty's attention. Experiment with a variety of entertainment options and see which keep your pet engaged. For instance, bring a few plants inside. These will provide interesting smells for your cat. Avoid plants like amaryllis, chrysanthemums, irises, lilies, and tulips, which can be toxic to cats. Hide some treats throughout the house. You can hide them in puzzle feeders or just easily accessible in unusual locations. Offer your cat a variety of toys like rolling balls, scratching posts, and a few wadded-up balls of paper. Your cat might also enjoy watching TV. If you have Animal Planet, NatGeo, or other nature programming, these are best. DVDs made specifically to entertain cats are also available, featuring footage of other animals. Create a kitty enclosure or walk your cat regularly. Your cat runs outside because he or she wants to get out and explore. They want fresh air, sunshine, and new, exciting smells! Fortunately, you can reduce your cat's desperate jailbreak attempts by letting your cat experience a bit of the great outdoors. If you have a screened porch, give your cat access to it. Ensure there are plenty of perches in it so that your kitty can see outside. If you don't have a screened porch, you can easily obtain some plastic or wire fencing and make a small enclosure which allows your cat to spend time outside without running out the front door. Provide access to the enclosure via a back door or open window. If your enclosure's walls are at least seven feet high, you do not need to include a roof. Walking your cat is another way to give him or her time to explore the great outdoors. Attach the leash to your cat's collar or harness and let them drag it around for a bit, getting used to the feeling of it. Give your cat a snack or some wet food while you're adjusting the harness in order to distract them from the process. Then, head outside and enjoy some bonding time with your kitty. Walking your cat gives it the opportunity to get the outdoor experience, and allows it to exercise its brain in new, healthy ways.
Distract your cat from the door. Provide entertainment. Let your cat explore the great outdoors.