The basis of the Islamic law ( also known as Shariah) are formed by two branches: RITUALS and SOCIAL RELATIONS.
All together they rule for the actions that are:
1. mandatory
2. recommended
3. neutral
4. abhorred
5. prohibited
So, if we compare Shariah with Western law, some actions are punished by law, while others are considered to be wrong.