A coupled model of transport, turbulence, and mesoscale flows is proposed, including turbulence spreading. The model consists of transport equations for plasma density and pressure coupled to a shell model of drift wave turbulence, which incorporates coupling to mesoscale flows via disparate scale interactions. The model can describe the turbulent cascade and its dynamical interplay with zonal and mean shear flows as well as the profile evolution (including the profiles of turbulence intensity itself) due to these self-consistent turbulent fluxes. This simple system of equations is shown to capture the low to high confinement (L-H) transition. It is also observed that as the heating is increased, the system goes through an intermediate phase that displays oscillations between zonal flows and turbulence. The transition towards the H mode, which is characterized by the presence of a strong mean shear flow at the edge, is triggered by the mesoscale dynamics due to the action of zonal flows, with turbulence spreading playing an important role in the H to L back transition.