The Story of Goody Two Shoes.
goody two-shoes (GOOD-ee TOO-shooz) noun
A smugly virtuous person.
[After the title character in The History of Little Goody Two-Shoes, a children's book believed to have been written by Oliver Goldsmith.]
In this moralistic nursery tale, Margery is an orphan who has only one shoe. One day, when she gets the full pair, she runs about shouting, "Two shoes!" Eventually she becomes rich and educated through her virtue and hard work.
The word goody was a polite term of address for a woman of humble social status. It's a contraction of the word goodwife and was formerly used as a title in a manner similar to the current Mrs.
-Anu Garg (gargATwordsmith.org)