Grocery sales were up 0.1 per cent in June compared with the same month in 2015, according to the KPMG Scottish Retail Sales Monitor.
It is the first reported sales growth since December 2015 and only the third time sales have increased in the last two years.
But the rise was offset by a decline in non-food sales, which dropped by 2.6 per cent compared to June 2015.
Overall, sales decreased by 1.4 per cent in June compared with the same month the previous year.
Adjusted for deflation, measured at 2 per cent, sales increased by 0.6 per cent in real terms.
The figures come as retailers are warned to be prepared for the impact of Brexit amid early indications of faltering consumer confidence.
David McCorquodale, head of retail at KPMG, said: "Although total sales are down on last year, the grocery sector saw a change in fortunes, registering its first growth in sales since December.
"Big ticket items in the non-food category continued to perform strongly. Bolstered by a summer of sport, electricals faired particularly well, as consumers looked to buy the latest televisions to watch the football, tennis and golf.
"That being said, the food retail market continues to face challenges and we can't yet fully predict how the cost impact of leaving the EU will trickle down to the consumer.
"Where we have already seen an impact is on the rising cost of family holidays abroad. As a result, we expect to see retailers try to benefit from staycations and overseas tourists in the short term."
He added: "June also saw high street retailers, once again, fall victim to inclement weather. Introducing early sales didn't prevent seasonal lines being hit by an unpredictable weather front which, after an initial sunny spell, dominated from the second week in June through to the end of the month.
"One thing for certain is that regardless of the weather forecast, the retail sector should be braced for further change and uncertainty as the politicians begin the process of brokering a new deal with Europe."
Ewan MacDonald-Russell, of the Scottish Retail Consortium, said it is too early to say if Brexit will have an impact on retail sales or shop prices.
"Scottish retailers remain open for business, and the vote has not changed their commitment to deliver for customers," he said.
"However, there are signs that customer confidence may have faltered since June 23."