Capitalism is based on private property rights, and individual economic freedoms to buy and sell your labour or property. That means it’s fundamentally reliant on the robust rule of law to enforce those rights, the rights of those purchasing property and services, etc. It’s those rights that enable the trust required for a functioning market. Corporatist, oligarchic and cartel based systems are often described as capitalist, but they’re really not capitalist because they don’t respect individual rights over capital any more than communism does. Like communism they’re just stitch-ups.
The role played by the rule of law often gets down played or even criticised by libertarian free marketeers. They think it’s needless regulation and just government interfering in free markets. But without the rule of law you get bloody free for alls like in Russia in the 90s.