The cost of "essential" items such as bread, milk and cheese are to be limited under John Swinney's plan.