Somali troops seize control of key town from Al-Shabaab
The MPs unanimously backed the ex-businessman, nominated by newly elected President Hassan Sheikh Mohamud.
Before the vote Mr Shirdon said he would form "an effective government to deal with current situation".
Somalia has suffered more than 20 years of war and the election of Mr Mohamud last month was considered the first fair poll in Mogadishu for 42 years.
Addressing MPs, President Mohamud said he was confident the new prime minister would do something about the "country
There have been explosions in Aden Yabal district, which were caused by mines that Al-Shabaab planted on the entrance roads to the district as well as important centers before withdrawing.