The amount was not disclosed but her lawyer, John Kelly, told Justice Peter Smith that she would donate the money to her Raising Malawi charity.
Madonna, who was divorced from Ritchie earlier this year, had sought damages in excess of 5 million pounds ($8 million).
Kelly said that the star went to great lengths to keep her December 2000 wedding private.
Three years later, he said, an interior designer who was working at Madonna's home in Beverly Hills in California copied at least 27 photos from the wedding album. The designer provided them to a woman who offered to sell them to the Mail on Sunday.
Kelly said the newspaper initially turned down the offer, but bought the pictures last year after Madonna and Ritchie announced that they would divorce.
The Mail on Sunday published them without consulting or warning her, Kelly said. Otherwise, Madonna would have sought a court ordering to block publication, he said.
No pictures of the wedding had been published before.
Get Action News on your website
Follow Action News on Facebook
Click here to get the latest Philadelphia news and headlines from across the Delaware and Lehigh valleys.