Shell model in the complex energy plane