Shell-model reaction matrix elements are calculated with a combination of the Moszkowski-Scott separation method and the reference-spectrum method of Bethe, Brandow and Petschek. The reaction matrix G is expanded in terms of G s and V L, where G s is the reaction matrix for the short-range potential V s and V L the long-range potential. The contribution from G s is then calculated with the reference-spectrum method, where the main criterion for choosing the separation distance is that G s is best approximated by G s R, the reference-spectrum approximation of G s. The second-order tensor term V TL ( Q/ e) V TL is calculated with the closure approximation of Kuo and Brown, however the effective energy denominator is now state-dependent, which means that it has a dependence on binding energy, the local density and the centre-of-mass quantum number. The contributions from V TL ( Q/ e) V TL vary almost linearly with ϱ 2 3 , where ϱ is the local density. The reaction matrix elements so calculated have a fairly strong state-dependence which comes in predominantly through G s and V TL ( Q/ e) V TL. The state dependence can be approximated quite accurately in a simple way, and thus the application to finite nuclei is convenient. Shell-model applications have been made for nuclei 18O and 18F and we find that the matrix elements are generally weaker than those of Kuo and Brown, especially for those of T = 1, J = 0 + and T = 0, J = 1 +. This is desirable, because the Kuo and Brown matrix elements are often somewhat too strong.