Ethan has a great post (though couple weeks back) about US involvement in Somalia and the much talked about African Command. Ethan calls it "the third" front for United State's war on terror, and it's. Actually Somalia was about become the "second front" after Afghanistan, the US army was seriously contemplating bombing Somalia but at the time there was nothing to bomb.
One thing I would like to suggest is that Ethiopia's intervention in Somalia wasn't because it was afraid of the Islamic Courts invading them, they were too weak to threaten Ethiopia. But it was Ethiopia's arch-rival Eritrea's support for the Islamic Courts, arming and funding them, that compelled Ethiopia to do something. Ethiopia and Eritrea fought a bitter war in 1998-2000, and there's now a real concern that the two countries are getting ready to resume the war. And It wasn't the first time the two countries took their war to Somalia either, as early as 1999 each was supporting a group of warlords.
So imagine Ethiopia's position, Eritrea is getting ready for a second round of war and they've an ally in Southern Somalia, it was really a dangerous situation for Ethiopia. But even then Ethiopia wouldn't have entered Somalia without the full support of the United States.
The United Sates, on the other hand, had a narrow objective, to capture some people in Somalia whom they'd intelligence were dangerous; mainly Somalis who fought in places like Afghanistan. US tried to capture these men by paying warlords in Mogadishu - literally coming into Mogadishu with suitcases full of money - the plan was naive and went horribly wrong, it led to the birth of the Islamic Courts.
This is where Ethiopian and American interests met; Ethiopia wants Eritrea out of Somalia and US wants to capture some people. We now know that US wasn't after Islamic Courts leaders - except Sheikh Aways of course - according to Jenday Frazer the Americans give passage to Shiekh Sharif to flee the country.
The United States's narrow focus on capturing few men here and there and bombing sites is pointless, short-sighted and really disappointing. US wasn't interested in the Somali peace conference which resulted in the TFG, but bombing "terrorist" and killing civilians as a result, yes that's a priority. And United States isn't interested in defusing the tensions between Eritrea and Ethiopia either, instead it's taking the side of Ethiopia which still refuses to abide by the International Court's ruling. As a resulted it has alienated Eritrea and promoted a proxy war between Eritrea and Ethiopia, now Eritrea is the hub of rebels, terrorists and insurgent from across the horn.