My advice to you would be not to leave your door open! You can teach her not to go out except when commanded but it won't be easy - she's going to want to explore the outside world.
However, it can be taught. You will have to make sure she is really good at `sit/stay' or even just `stay' first, though.
Do you know how to teach these commands?