This is the phrase you say when you are in front of young people, old people, and your boss. Or if you just don't want to cuss. It is a lot better than saying "What the fuck!?" Or "Shut your mouth!". It is a censor phrase and is commonly used by Stacey London on What Not to Wear.
Lisa:"Bobby and I got engaged!"
Amy:"Shut the front door!"