M&S is to trial an online grocery shopping service to deliver food to customers' homes for the first time.
The retailer's boss Steve Rowe said it needed to be ready to respond to changing shopping habits.
M&S has overhauled its online offering in recent years but has until now fought shy of making its food offering available on the internet.
Yet food has been a strong performer for the company even as it has struggled to improve the performance of its beleaguered fashion ranges.
Mr Rowe, who took over as chief executive a year ago, said: "We continue to review food online carefully.
"It has not cost us anything over the last five years by not being online with food.
"Our customers haven't moved yet, but they will and we need to ensure that we are ready with the right response.
"There are unanswered questions over what this means for M&S and we have a team looking at this now with a view to undertaking a soft trial in the autumn."
M&S currently sells online party food - for collection in store - and delivers wine plus a very limited selection of gift foods such as chocolate to customers' homes.
The new trial will be the first time its wider grocery offering will be made available online for home delivery.
Few details of the plan, first reported by the Guardian, have been set out.
Supermarkets have been expanding delivery services but the costs involved mean they may struggle to make a profit.
Mr Rowe said: "The economics of food online are not straight forward and it is not something that we are going to rush into until we have substantial customer insight and a better understanding of what is right for M&S and right for our customers."
Last week, M&S confirmed plans to shut six stores as part of a larger programme of closures announced last year, in a shake-up which will also expand its food-only sites.