The Book of Lord Shang was an early Legalist work generally attributed to the eponymous Lord Shang.
The Book of Lord Shang teaches that laws are designed to maintain the stability of the state from the people, who are innately selfish and ignorant. There is no such thing as objective goodness or virtue; it is obedience that is of paramount importance.
Probably compiled sometime between 359 and 338 BCE. Along with the Han Fei-Tzu, it is one of the two principal sources of Legalism, a school of Chinese political thought. Legalism asserts that human behavior must be controlled through written law, rather than ritual, custom or ethics, because people are innately selfish and ignorant.
The law is not effective when it is based on goodness or virtue; it is effective when it compels obedience. This is essential to preserve the stability of the State.