A Shack-Hartmann wavefront sensor samples the wavefront in the pupil. The wavefront shape will be undersam pled, since although the wavefront average spatial spectrum is a rapidly decreasing function of spatial frequency, it contains frequencies higher than the Nyquist limit : this well-known phenomenon is known as aliasing. The impact of aliasing in adaptive optics is difficult to estimate. Some methods have been proposed, that aim at optically filter out high wavefront frequencies ; some authors gave an estimate of this error, but most of the time these estimations are based on Monte-Carlo simulations of wavefront sensor. We propose in this paper an analytical study of the aliasing effect, and study how the aliasing error distributes over temporal frequencies. An analytical expression of the temporal spectrum of the aliasing error maybe of importance for system modeling or performance prediction in adaptive optics.