In this paper we review the semiclassical extended Thomas-Fermi theory for describing the ground-state properties of nuclei. The binding energies calculated in this approach do not contain shell effects and, in this sense, they are analogous to those obtained from the mass formula. We discuss some techniques for incorporating the shell effects which are missing in the semiclassical calculation, such as the so-called expectation value method and the Kohn-Sham scheme. We present numerical applications for effective zero-range Skyrme forces and finite-range Gogny forces.