The Shabaab, who called the attack on the Charlie Hebdo satirical weekly in Paris a "heroic operation" against a "lair of evil and centre of disbelief", offered specific warnings to France.
"We warn France and those who tread her course about the implications of their hostility towards Islam and the consequences of their oppression and belligerence against Muslims," the statement read.
The Islamists said the attacks, in which 17 people died in three days of bloodshed, were "worthy of being emulated".
"We also take this opportunity to thank our brothers, al-Qaeda in the Arabian Peninsula, who have been - and continue to be - the pioneers of external operations that target the heart of the Crusader enemies," the statement added.
The Shabaab, who control large areas of rural Somalia, are reported to have close links with al-Qaeda fighters in neighbouring Yemen, where one of the two brothers who carried out the attack is believed to have trained.
The Shabaab were also linked to Mohamed Geele, a Somali man who was convicted of a 2010 axe attack against Danish cartoonist Kurt Westergaard, who had faced numerous death threats since his caricature of the Muslim prophet Mohammed appeared in the Danish daily Jyllands Posten in 2005.