Cléante comes onstage and tells Harpagon not to worry about his money: he knows where it is. Cléante also tells his father that if he okays the marriage between Cléante and Mariane, he'll get his precious money back. (Harpargon = Gollum, and the moneybox = the One Ring. And by making that comparison, we = total nerds. Nerd pride.)
M. Anselme tries to convince Harpagon to consent to the two marriages—Élise to Valère and Cléante to Mariane. Harpagon agrees as long as M. Anselme buys him a new suit… and pays for both weddings. Anselme agrees, both to make the problem go away and because he's a real stand-up guy.
Everything seems to be wrapped up nicely. The police officer, however, wants to know who's going to pay him for writing up his police notes, since he's been scribbling furiously this entire time.
Again, M. Anselme opens his wallet to make sure everyone is satisfied. He pays the police officer and everyone leaves the stage. The last line goes to Harpagon, who can only think about seeing his beloved moneybox again. Harpagon rubs his hands together and whispers "My preciousssss." (No, we lied. He doesn't do that in the actual play; he only does that in our dreams.)
Yup, the villain doesn't change at all by the end of the play, and he isn't even punished. By the end of the play, he's actually richer—he has a snazzy new suit. But hey, those are the breaks sometimes and Molière was too cynical to think that people like Harpagon would just suddenly change.