This is the beginning of their trial.
Mohamed Ahmed Abdi, Liban Abdullah Omar, Hussein Hassan, and Adan Mohamed Ibrahim are accused of giving support and shelter to gunmen who killed at least 67 people during the assault on Nairobi's Westgate complex that started on September 21.
Prosecutors say the four committed a "terrorist act" under Kenya's anti-terrorism laws and used false documents. The men deny all the charges.
Westgate guard Stephen Juma told the court he saw three gunmen jump out of white car that pulled up outside the mall.
One, he said, immediately shot dead a shopper.
"I couldn't recognise them since they had covered their heads and faces with black headscarves," said Juma, who had worked there for five years.
Kenyan police and Western experts who joined the investigation said four gunmen carried out the attack, which struck at the heart of east Africa's biggest economy. They say all the gunmen died in the attack.
The assault was claimed by the Somali Islamist rebel group al Shabaab and highlighted the militants' reach beyond Somalia's porous borders.