  The intrinsic dynamics of a system with open decay channels is described by
an effective non-Hermitian Hamiltonian which at the same time allows one to
find the external dynamics, - reaction cross sections. We discuss ways of
incorporating this approach into the shell model context. Several examples of
increasing complexity, from schematic models to realistic nuclear calculations
(chain of oxygen isotopes), are presented. The approach is capable of
describing a multitude of phenomena in a unified way combining physics of
structure and reactions. Self-consistency of calculations and threshold energy
dependence of the coupling to the continuum are crucial for the description of
loosely bound states.
