Retail has always been shaped by consumer behaviour, but the pace of change in recent years has accelerated dramatically.