The plane vibrations are considered of a slab composed of material which, although predominantly linearly elastic, displays also viscoelastic and nonlinear elastic constitutive behaviour, in the case when the faces of the slab are held fixed. An averaging method is used to simplify the problem, treating the nonlinear elastic and viscoelastic terms as perturbations. When the viscoelastic decay time is sufficiently short, the viscoelasticity may be treated by a Voigt approximation, and the averaging method reduces the problem to Burgers' equation. If, however, the decay time is of the same order as the shock thickness, the viscoelastic terms must be left in functional form, and Burgers' equation is replaced by a certain integro-differential equation. A method of matched asymptotic expansions is used to analyse the structure of the solution in the neighbourhood of the shock waves which form, and in particular it is shown that the paths of these shocks may be found from a version of Whitham's equal areas rule, for a general relaxation function. When the relaxation function is of exponential form the solution in the shock layer is obtained explicitly, the shock profile showing a distinct asymmetry about its centre.