The book version of "The Wonderful Wizard of Oz," which was written by L. Frank Baum, ends in very much the same way that the movie starring Judy Garland ends. In both, Dorothy Gale makes her way back to Kansas by means of magic. In both, she has to click her heels together three times and then wish. In both, she returns home to a joyous welcome.
In the book, Glinda the good witch tells Dorothy that she has the power to return home by using the shoes. Dorothy does, but loses the shoes during the journey back to Kansas.
At the end of the book "The Wizard of Oz" Dorothy and her friends clean up a bit before it is time for Glenda the Good Witch to help Drothy. Glenda then tells Dorothy that the silver shoes that she is wearing has the power to take Dorothy to many places and all she has to do is to knock her heels together three times, but that it will all happen very quickly.
Glenda kisses Dorothy goodbye and kisses her on the cheek. Dorothy picks up To To and clicks her heels together three times. Suddenly, Dorothy finds herself sitting on the Kansas prairie. Before Dorothy is a new farm house that had been built to replace the previous one that had been destroyed in the tornado.
Dorothy's Uncle Henry is milking cows and her Aunt Em comes out of the house to water cabbages. The silver slippers have disappeared off of Dorothy's feet. Dorothy runs into her aunt's arms and is hugged and kissed and when she is asked where she has been she says, "In the Land of Oz."