Resonance reactions and the nuclear shell model I