Demand response programmes are seen as one of the contributing solutions to the challenges posed to power systems by the large-scale integration of renewable power sources, mostly due to their intermittent and stochastic nature. Among demand response programmes, real-time pricing schemes for small consumers are believed to have significant potential for peak-shaving and load-shifting, thus relieving the power system while reducing costs and risk for energy retailers. This paper proposes a game theoretical model accounting for the Stackelberg relationship between retailers (leaders) and consumers (followers) in a dynamic price environment. Both players in the game solve an economic optimisation problem subject to stochasticity in prices, weather-related variables and must-serve load. The model allows the determination of the dynamic price-signal delivering maximum retailer profit, and the optimal load pattern for consumers under this pricing. The bilevel programme is reformulated as a single-level MILP, which can be solved using commercial off-the-shelf optimisation software. In an illustrative example, we simulate and compare the dynamic pricing scheme with fixed and time-of-use pricing. We find that the dynamic pricing scheme is the most effective in achieving load-shifting, thus reducing retailer costs for energy procurement and regulation in the wholesale market. Additionally, the redistribution of the saved costs between retailers and consumers is investigated, showing that real-time pricing is less convenient than fixed and time-of-use price for consumers. This implies that careful design of the retail market is needed. Finally, we carry out a sensitivity analysis to analyse the effect of different levels of consumer flexibility.