What does ‘Goody Two Shoes’ mean?

In an anonymously authored eighteenth-century morality tale for children,

The History of Little Goody Two Shoes, the heroine was a poor, ragged, orphan named Margery who only had one shoe. Upon being given a full pair she went around showing them off to everyone. With her two shoes, Margery tried to do as much good as possible, and consequently grew up to be comfortable, well off, and happy, proving her superiority over “such wicked Folks, who love nothing but Money, and are proud and despise the Poor, and never come to any good in the End.” From that time on, a Goody Two Shoes became a mocking reference to someone you think is too self-righteous and follows every rule.