The Shaolin Temple was founded in year 495AD. The temple was built in the Northern Wei Dynasty by the Emperor in order to encourage the teachings of Buddhism.
Over time the prosperity and fame of the temple grew and spread throughout China and the rest of the world. It became most famous during the Tang Dynasty when 13 monks saved the Emperor from assassination. At this time the Temple owned thousands of miles of land, over five thousand buildings and was home to thousands of monks.
Shaolin kung fu is a part of Chinese kung fu. Shaolin kung fu was not the first type of kung fu, in ancient times people had to fight everyday for survival as well as use tools to work the land and make produce. So kung fu came into being by long term practicing and developing of this daily struggle. During the stone age (roughly 600000 years ago) our ancestors had begun to hunt with flint, axe, stone sword, stone hammer, stone sickle etc. People got the notion of chopping, spliting and smashing and they used these weapons and techniques when in combat with animals and each other.
With the development of social interteraction clans were formed and fighting techniques evolved into a military style as opposing factions fought for control over land. People looked for ways to improve their bodies and the effectiveness of their weapons. This laid the foundation for the development of kung fu forms and weapon techniques.