First things first, whatever you might read elsewhere this film has nothing to do with the traditional Burning of the Shaolin Temple story - it's set in a different time period, totally different factions and characters involved. I have no idea if there is any real historical basis for this story, but I suspect not.
The time is the early days of the Chinese Republic, i.e. around the turn of the 20th Century. In the vaccuum left by the revolution, warlords have taken power in a number of regions. In the film, this includes the area of the Shaolin Temple. Andy Lau plays a rather ruthless warlord (General Hou), intent on seizing power over the area. The one thing he won't do to gain power is make concessions to foreigners - China for the Chinese etc. Nicholas Tse plays his protege (Cao Man), who learns the lessons of ruthlessness a little too well.
General Hou's violence and lack of compassion come back to bite him, and when disaster strikes he seeks refuge in the Shaolin Temple. He rather too readily abandons his greed and lust for power and accepts the principles of Buddhism - compassion, benevolence, sacrifice and letting go of desire. Jackie Chan has a small part as the temple chef, who is a positive influence on him - as is the wise abbot played by Yue Hoi.
Meanwhile, whilst Hou is on the fast track to enlightenment, Cao Man has filled his role, and his lust for power is even less bridled than his mentor's - he readily collaborates with the foreigners against his own countrymen, and when he finds out that Hou is still alive he cannot tolerate that situation continuing.
Ultimately, Hou and the Shaolin Monks must resist Cao Man's evil ways to protect the people, making many sacrifices to do so (i.e. they have a great big fight).
Shaolin is a fairly shallow film, the messages about Buddhist wisdom being put forward in a pretty simplistic way, but it is well crafted and written. Production values are top notch, acting very good, visuals and audio very slick. Action scenes are very well choregraphed and executed.
Well worth a look.