The following quotes and lyrics are from the last scene in the movie where Dorothy has discovered that the Wiz is a fraud. She has helped her friends the scarecrow, the tinman, and the lion realize that what they thought they were lacking they'd really had all along. Glenda the good witch of the south appears and tells Dorothy that she possessed the power she needed to get home all along also.
Wiz: Can you do something for me?
Dorothy: They (scarecrow, tinman, and lion) had what they've been searching for
inside them all along. I don't know what's inside you. You'll have to find that
out for yourself. But I do know one thing. You'll never find it in the safety of
this room. I tried that all my life. It doesn't work. There's a whole world out
there and you'll have to begin by letting people see who you really are.
Scarecrow: Success, fame, fortune. They're all illusions. All there is that is
real is the friendship that two can share.
Dorothy: That's beautiful. Who said that?
Scarecrow: I did.
Dorothy tells her friends thank you and they fade out of view. She turns to Glenda and says that she's ready. Glenda tells her to think of home. She starts to focus and reflects on what she has learned. She sings "When I think of Home"