Many dogs will bolt through a door or gate as soon as you open it.   Some try to pry it open, using their noses as a wedge.  Others jump at the door, hitting or scratching it with their paws when they even thin you're about to open it. 

These tactics can allow your dog to zoom out unrestrained.  Dashing out an open dog or gate can e very dangerous, so keep your dog safe be teaching him/her to wait for permission before going through.

    Leash your dog. and stand with him/her by the door.  Say "wait" and reach toward the doorknob, but don't touch it.  If (s)he doesn't move forward, praise him/her by saying "thank you" (or your other reward marker word) and give him/her a yummy, pea-sized treat.  Practice this a few times, rewarding your dog each time (s)he waits.

    However, if your dog jumps or pushes the door when you reach for the knob, drop your hand to you side.  Don't say anything or make a disapproving face or tighten the leash; simply stand calmly and wait for him/her to relax.  Then try again.  If your dog has a strong habit of bolting, you may have to do this several ties before (s)he catches on.

    Once your dog will wait when you reach for the doorknob, progress to touching the knob.  Reward with praise and treats every time she waits when told.  Then tell him/her, Wait," open the door a crack, then quickly close it.  Praise and give him/her a treat if (s)he doesn't try to squeeze through.  Practice this several times.

    next, progress to opening the door a bit wider, closing it again each time, then praise and reward your dog.  When you can finally pen the door all the way, praise your dog, give him/her a treat, then tell him/her "OK, go out."

    Begin training "wait" with your pup on leash, just in case (s)he tries to bolt.  Don't use the leash to hold him/her back or jerk to correct him/her; it's just a safety line in case (s)he bolts.  If at any point (s)he does rush out, gently bring him/her back in, return to the previous step, practice that a few times, then try again.

    Once (s)he understands what "Wait" means, practice off leash. Meanwhile, use care when you open doors, so (s)he doesn't get the chance o practice dashing through without permission. 

    When (s)he's good about waiting at doors, work on the same skills at gates, car doors and other openings that lead to fun or freedom.  Before long, waiting for permission will become a good habit.