We solve numerically the equations of motion for the collapse of a shell of baryonic matter falling into the central regions of a cluster of galaxies, taking into account of the presence of the substructure inducing dynamical friction. The evolution of the expansion parameter a(t) of the perturbation is calculated in spherical systems. The effect of dynamical friction is to reduce the binding radius and the total mass accreted by the central regions. Using a peak density profile given by Bardeen et al. (1986) we show how the binding radius of the perturbation is modified by dinamical friction. We show how dynamical friction modifies the collapse parameter of the perturbation slowing down the collapse.