Opposition leader Shehbaz Sharif was elected as the 23rd Prime Minister of Pakistan after 174 lawmakers voted in his favour.