Single-shot spectrum measurements of the radiation emitted by an electron bunch provide a novel way to characterize the bunch shape. Shot noise fluctuations in the longitudinal beam density result in radiation with a spectrum that consists of spikes with width inversely proportional to the bunch length. The variance of the Fourier transform of the spectrum is proportional to the convolution function of the beam current averaged over many bunches. After the convolution function is found, the phase retrieval technique can be applied to recover the bunch shape. This technique has been used to analyze the shape of the 4-ps-long bunches at the Low-Energy Undulator Test Line at the Advanced Photon Source