Shell model study of pairing correlations