The density distribution of N electrons placed inside an empty spherical impenetrable shell constitutes an interesting application of the Thomas-Fermi (TF) model with great academic potential. For large N, this solution is amenable to a perturbative analytic expansion. Here, we prove the virial theorem (VT) for the TF solution of spherically symmetric electron distributions. Then, we find out that the fulfilment of the VT in the specific case of the electrons in a shell, is implemented order by order throughout the perturbative series. (C) 2003 Elsevier B.V. All rights reserved.