Treatment of the continuum-continuum interaction in the shell-model approach to nuclear reactions