Spinal needle injections for back pain management are frequently carried out in hospitals and radiological clinics. Currently, these procedures are performed under fluoroscopy or CT guidance in specialized interventional radiology facilities. As an alternative, the use of inexpensive ultrasound image guidance promises to improve the efficacy and safety of these procedures. We propose to eliminate or reduce the need for ionizing radiation, by creating and registering a statistical shape model of the lumbar vertebrae to 3D ultrasound volumes of patient, using a groupwise registration algorithm. From a total of 35 patient CT volumes, a statistical shape model of the L2, L3 and L4 vertebrae is built, including the mean shape, and principal modes of variation. The statistical shape model is registered to the 3D ultrasound by interchangeably optimizing the model parameters and their relative poses. We also use a biomechanical model to constrain the relative motion of the models throughout the registration process. Validation is performed on three tissue mimicking-phantoms designed to preserve realistic curvature of the spine. We compare pairwise and groupwise registration of the statistical shape model of the spine and demonstrate that clinically acceptable mean target error registration of 2.4 mm can be achieved with the proposed method. Registration results also show that the groupwise registration outperforms the pairwise in terms of success rate.