The Shaolin/Sil Lum sect is a branch of the Buddhist school known as Ch'an (the equivalent in Japan is Zen; the Shaolin-descended school of martial arts and philosophy in Japan is "Shorinji Zen"). Unlike most monotheistic Occidental religions that supplanted each other as Europe became "civilized," many Asian religions and philosophies resulted in amalgamations. By the time of Chan, Taoist thought was over 3000 years old and was woven into the fabric of Chinese society. Taoist and Buddhist scholars had intermingled for several hundred years before Bodhidharma's (founder of Ch'an Buddhism) time, and many books looking at Buddhist teachings in a Taoist way had been written. The two systems were generally considered to be very complimentary and hence, over time, the Ch'an sect became a complex mixture of Buddhist and Taoist concepts. It was during Bodidharma's time at the Shaolin Temple where the history of Shaolin Kung Fu began.
Taoism also had its own martial traditions, utilizing the very concepts of Tao to create styles that suited their goals and outlook. Later, many of these precepts would find their way into various internal style martial art forms including the most famous of Tai Chi Chuan.
Just as Ch'an Buddhism grew out of the interconnectedness of Buddhism and Taoism (and in the way that Taoism, Buddhism and the Confucian tradition cohabit), so too do practitioners of Kung Fu (in the broader sense) relate to the many Chinese philosophies.
One further note of importance: most Asian belief systems are represented by both a religious and a non-religious form. Religious aspects are those that adhere to belief in deities, supernatural occurrences, and some distinct model for an after-life. In contrast, the non-religious (we term these "philosophical" for simplicity) aspects do not concern themselves with deities, magic, or "unknowable" knowledge. It is the latter aspect of both Buddhism and Taoism that sets Ch'an apart as a distinct entity.