The high street stalwart received a customer score of 78% in the annual Which? survey, narrowly beating Aldi (77%) into second place.
M&S not only received a high customer score in the survey, but also received five stars for store appearance, customer service and the quality of its own-brand and fresh products.
Aldi, which topped last year’s poll, was the only supermarket to get a full five stars for value for money.
Survey respondents described it as “cheap and cheerful” but said it was let down by long queues.
When it came to online supermarkets, Iceland was voted the best with a score of 76%, winning five stars for its availability of delivery slots and how easy its website or app was to use.
Tesco scored alongside Ocado (74%) as joint second best online supermarket.
Online-only Ocado (74%) was the only supermarket to get the full five stars for its product range.
Which? surveyed 3,057 members of the public online in October, of whom 1,304 reported their online grocery shopping experience.
Waitrose completed the top three with 75% but, like M&S, suffered lower scores on value for money.
M&S chief operating officer and food managing director Stuart Machin said: “As M&S Food modernises to become a bigger, better, fresher food business and expand our appeal to enable more customers to shop bigger baskets, this is a welcome endorsement.”