As his government announced a strategic victory against the rebels, Ali told reporters on the eve of a major conference on the future of the war-ravaged nation that the Shabaab were a "global enemy, not only a Somali enemy".
The Islamist group already faces the threat of US drone attacks, but Britain's Guardian newspaper reported on Wednesday that Britain and other EU countries were considering military air strikes on Shabaab training camps.
"I have had no discussions of that with the European governments. But targeted al-Shabaab airstrikes are a welcome opportunity," Ali said ahead of the conference in London on Thursday.
"But we have to make sure that the safety and the property and the lives of the Somali people are protected. This is the utmost priority for us."
He also announced that Somali and Ethiopian forces had seized back the south-western city of Baidoa, which had been one of the Shabaab’s main bases, leaving the group's fighters in central Somalia increasingly isolated.
Ali is seeking a huge package of international help for Somalia at the conference, which will be attended by UN Secretary General Ban Ki-moon and US Secretary of State Hillary Clinton.
He wants something akin to the US aid programme that helped rebuild Europe after World War II, to construct roads, schools and hospitals, saying: "The expectations for us is there's going to be a huge Marshall Plan for Somalia."
Concrete pledges of funds
But he admitted he had received few concrete pledges of funds ahead of the meeting, adding: "I really have no clue of what they will say tomorrow."
One of the issues on the agenda will be piracy off the coast of Somalia, which has been plagued by lawlessness and famine since the collapse of the last strong government in Mogadishu two decades ago.
The prime minister welcomed international maritime efforts to tackle piracy, but said the problem must also be tackled at its root - namely the lack of any real law enforcement, and the widespread poverty in Somalia.
"The opportunity cost of going to the high seas is not very high. They have nothing to lose and everything to gain," he said.
Ali, a Harvard tax law graduate who was appointed in June at the head of a transitional government, expressed confidence however that Somalia was finally on course to resolve its problems.
"Now people are ready to put that behind them and to move forward," he said.