M&S plans to display the QR codes of items that are not available in-store, which will guide shoppers to the mobile site, where it can be purchased. The free Wi-Fi will be supplied by The Cloud.
The trial will be run in a clutch of stores. Sienne Veit, head of mobile development at M&S, said: "We know customers research online before they buy and we want to help them to continue doing so when they are in our stores.
"By integrating QR codes into our decor we hope to make it easier for customers to choose the right products and help us better understand how they use mobile devices in our stores."
Retail analyst Nick Bubb said the trial would be part of a wider strategy to increase mobile shopping.
"It is amazing how many people already do shop on their mobiles. M&S want to get into that, but have to think about how to display the products.
"M&S will be looking at John Lewis, who has had up to 20% of products sold online, and wanting some of that, and they also have to reduce their reliance on Amazon, who hosts their retail website.
"This type of mobile selling is still small scale but accelerating rapidly."
Tim Watson, strategy director at OgilvyAction, said: "The M&S multichannel store format is another example of a retailer understanding the changing nature of shopping driven by shoppers' adoption of mobile technology.
"As shoppers become more and more at ease with using QR codes and image recognition services to research products on the go, they will demand these services and shop at stores which provide these additional added value services.
"One disadvantage of this technology is that we will become one handed shoppers unless retailers start to look at the complete shopper journeys that include offering trolleys and baskets that hold mobile devices.
"The real power for the retailer in the future will be offering applications that use customer insight and apply this insight to promote to shoppers with relevant, timely and geo located offers.
"This insight will be gained from joining up data from online visits, mobile access and in-store journeys to give excellent customer experiences and services to enable shoppers to buy through the channel they want, when they want it and have the product delivered to their desired timescales."