The president in his discretion appoints from amongst the members of National Assembly who has command the majority of members in the house.
The members of the National Assembly elect PM, the leader of the majority party. Assembly in its first session elects speaker and Deputy Speaker and then the Prime Minister. The Prime Minister shall be elected by the majority vote of the total membership of the National Assembly.
After election the P.M takes the oath in the presence of the president. He declares to be Muslim and the belief in the finality of Prophet (S.A.W.W) promises to act upon the Islamic ideology, to give presence to national interest, protect the constitution and be loyal with the country.
Article Source: http://EzineArticles.com/5727546