By determining the law, and specificiallly determing it in such a way that overall the market and property is defined in the interest of capital. This does not entail as has been shown that the law for its part cannot be relatively autonomous. When this autonomy seriously conflicts with capitalist aims there will be a struggle to change the law. Surely this has happened as the welfare state laws have been eroded or even jettisoned in the age of globalisation. Many of these changes have zilch to do with free markets, by the way, but everything to do with profit.
Agreements re patent protection are a good example.
I agree with your general point, David, but you can overdo it.