  The shell model embedded in the continuum is applied to calculate the
astrophysical S-factor and the reaction rate for the radiative proton capture
reaction 17F(p,gamma)18Ne. The dominant contribution to the cross-section at
very low energies is due to M1 transitions J_i^pi = 2^+ --> J_f^pi = 2_1^+
whose magnitude is controlled by a weakly bound 2_2^+ state at the excitation
energy E_x = 3.62 MeV.
