Retail sales volumes fell by 1.2% in July after the wet weather hit summer clothing sales and the cost of living weighed on food shoppers.
The Office for National Statistics (ONS) said it was a particularly bad month for supermarkets.
Department stores also reported falling demand for household goods.
Illustrating how much prices have risen, the ONS said that compared to February 2020 - the last full month before Covid struck - total retail sales were 16.4% higher by value but 1.8% lower in the volume of goods people bought.
Earlier this week, new figures showed that inflation, which measures the rate at which prices are rising, slowed again to 6.8%. However, food prices are still increasing at a high rate.
Ruth Gregory, deputy chief UK economist at Capital Economics, said she was cautious about reading too much into the retail sales figures since it "had a lot to do with last month being the sixth wettest July since records began in 1836".
"But with the Bank of England's interest rate hikes still feeding through and consumer confidence falling, we remain downbeat on the outlook for overall spending this year," she said.