We apply the complex scaling method to the calculation of scattering phase shifts and extract the contributions of resonances in a phase shift and a cross section. The decomposition of the phase shift is shown to be useful in understanding the roles of resonant and nonresonant continuum states. As examples, we apply this method to several two-body systems: (i) a schematic model with the Gyarmati potential, which produces many resonances, (ii) the α-α system, which has a Coulomb barrier potential in addition to an attractive nuclear interaction, and (iii) the α-n system, which has no barrier potential. Using different kinds of potentials, we discuss the reliability of this method to investigate the resonance structure in the phase shifts and cross sections.