This paper analyzes the performance of an energy detector over wireless channels with composite multipath fading and shadowing effects. These effects are modeled by using the and channel models. Closed-form average detection probabilities are derived for both and channel models for the no-diversity reception case. A simple approximation is also derived for large values of energy threshold in the energy detector. The analysis is then extended to cases with diversity receptions including maximal ratio combining (MRC) and selection combining (SC). Analytical results are verified by Monte Carlo simulation and by numerical methods. Receiver operating characteristic (ROC) curves are presented for different degrees of multipath fading and shadowing. Finally, the Rayleigh-lognormal distribution and the distribution are numerically compared, and the validity of the channel model for representing the impact of shadowing on the performance of energy detection is affirmed.