"Dhamma" literally means "religion".
Dhamma is the path that Gautama Buddha showed to convey the knowledge and truth he acquired after attaining enlightenment to the people.
Dhamma is a spiritual lifestyle.
According to the Buddha, Dhamma is that which is beneficial in the spiritual development of a person.
Shil, Samadhi, Dan, Pragya etc. are beneficial in spiritual development. Therefore it is Dhamma.