The effect of pions on the nuclear shell structure is analyzed in a relativistic Hartree-Fock approximation (RHFA). The Lagrangian includes, in particular, a mixture of pi N pseudoscalar (PS) and pseudovector (PV) couplings, self-interactions of the scalar field sigma and a sigma-pi interaction that dresses pions with an effective mass (m(pi)*). It is found that an increase of m(pi)* strongly reduces the unrealistic effect of pions, keeping roughly unchanged their contribution to the total binding energy.