  We present estimates of the photometric redshifts, stellar masses and star
formation histories of sources in the SCUBA HAlf Degree Extragalactic Survey
(SHADES). This paper describes the 60 SCUBA sources detected in the Lockman
Hole covering an area of ~320 square arcmin. Using photometry spanning the B
band to 8um, we find that the average SCUBA source forms a significant fraction
of its stars in an early period of star formation and that most of the
remainder forms in a shorter more intense burst around the redshift it is
observed. This trend does not vary significantly with source redshift but the
exact ratio of early to late mass is quite sensitive to the way extinction is
treated in the modelling. However, the sources show a clear increase in stellar
mass with redshift, consistent with downsizing. In terms of SED types, only two
out of the 51 sources we have obtained photometric redshifts for are best fit
by a quasar-like spectral energy distribution, with approximately 80 per cent
of the sources being best fit with late-type spectra (Sc, Im and starburst). By
including photometry at 850um, we conclude that the average SCUBA source is
forming stars at a rate somewhere between 6 and 30 times the rate implied from
the rest-frame optical in a dust obscured burst and that this burst creates
15-65 per cent of the total stellar mass. Using a simplistic calculation, we
estimate from the average star formation history that between one in five and
one in 15 bright (L_* +2 mag < L_optical < L_* -1 mag) galaxies in the field
over the interval 0 < z < 3 will at some point in their lifetime experience a
similar energetic dusty burst of star formation. Finally, we compute the
evolution of the star formation rate density and find it peaks around z=2.
