Praising Allah, (iman, zikr, etc.) paying thanks for what he has given,
honouring the universe and asking for forgiveness for our mistakes in
order to receive guidance and prosperity is the purpose of prayer (salah).
The other pillars serve for self-purification (hadj), learning self-restraint
(fasting/sawm) and balancing out social injustice (charity/zakat). Believing
and practising righteous deeds for the love of Allah and the fear of
the last day go hand in hand and are the basis for the only possible
solution to every problem.
The 5 pillars are a foundation for justice. Belief without good
deeds is like men without water. The poorest man is the one who has
strong pillars but is unjust and not kind! The pillars with the addition
of Dawah (invitation) and Jihad (striving against evil) are a means
of serving Allah, one's own soul and mankind.