The interaction between electrons and phonons mediates also an additional interaction between electrons. So it's possible in a certain approximation to take into account the electron-phonon interaction by considering an attractice effective electron-electron interaction in addition to the usual repulsive Coulomb interaction between the electrons. This attractive interaction plays the fundamental rôle in the BCS-theory of superconductivity.