The phenomenon of shape coexistence is discussed within the self-consistent Hartree-Fock method and the nuclear shell model. The occurrence of the coexisting configurations with different intrinsic shapes is traced back to the properties of the effective Hamiltonian.