How do two countries that share a border in the EU (which are a part of the Schengen area) maintain their different laws regarding customs regulation and price regulation of various commodities (as they can be freely transported among the borders)? People would easily transport commodities that are banned in one country from another country where they are allowed.
The same way laws not involving international transportation are maintained. Through police investigations and a justice system that punishes criminals. The underlying idea of the Schengen Agreement is that a huge majority of international travel is entirely legitimate. This is especially true in the Schengen Area, where almost every person legally allowed to be on one side of the border, is also legally allowed to be on the other side (because of the EU's free travel rules, and Schengen's common visa policy).
But while in other areas of life people are assumed innocent until proven guilty, when crossing a border in most of the world people are instead assumed guilty until a border guard is convinced of their innocence after questioning and searches. This is not only an inconvenience for travellers, but also requires a lot of money from tax payers.
Instead, in the Schengen Area cross-border criminal activity is treated the same way as other criminal activity: through random checks, anonymous tips, investigations, and so on.
Yes, this means it's very likely that you'll get away with stuffing your car boot full of alcohol and take twice the legally permitted amount over the border. The problem is, what do you do with it at that point? You can't legitimately sell it, because any tax audit will be a disaster if you have no purchase invoices for the products you sell. You can set up an illegal business selling bottles of wine as if they were illegal narcotics, but scaling this up to something that's worth your while runs the risk of the justice system finding out about it.
So what are you left with? Smuggling things for personal use or for making very small amounts of money. And this definitely happens, a lot. But the Schengen countries have decided that trying to prevent this through border checks is like preventing speeding by covering every square metre of road with speed cameras: the cost is just not worth it. Complete prevention isn't necessary, random checks to discourage the behaviour is entirely sufficient.
Actually this is two different questions.
First, how do different prices still exist? Simply because for most people it is not economic to drive 100km to go shopping, although that really depends. I live in Germany right at the Swiss border (they are not in the EU but in the Schengen area as well) and the Swiss guys drive quite a lot to go shopping because including the VAT refund most goods are like half the price.
Second question is how do countries prevent people importing illegal goods? There is a misunderstanding of what the Schengen area actually means. It just means that people can freely travel between countries. It does not mean that there are no checks at all and it does not mean that you are allowed to transport arbitrary amounts of goods across borders.
There are checks, although in my experience they are pretty infrequent and not always right at the border. To be more precise, I have seen more customs checkpoints 20km away from the border at the highway than right at the border. So if you happen to buy something illegal while abroad (like weed or a knife classified as a weapon) or you had been withdrawing a large amount of "tax optimized" money from your Swiss bank account, you might just be stopped and checked on the highway a while after you smuggled it into the country. Obviously, those checks are rarely during daytime and it is probably not preventing anyone from smuggling things for a business.
maintain their different laws regarding customs regulation
Things get a bit complicated for non-EU Schengen members (Switzerland and Norway) but for EU members the idea is that there aren't any customs regulations to think of with a few minor exceptions. All goods can be transported anywhere at any time, with zero taxation at the border. That's the idea behind the European Single Market. Customs checks are conducted at external non-Schengen borders, at which point goods are free to move around the EU.
price regulation of various commodities
The idea is that eventually prices should completely equalize among EU nation states, adjusted for shipping costs and sales tax amounts. If prices are not equal, smart entrepreneurs will arbitrage the discrepancy until this difference is reduced to zero.
People would easily transport commodities that are banned in one country
Yes and they often do so. But the cost of these violations to society is much lower than the cost of imposing stringent checks at the border. Sure, someone might set illegal fireworks on fire or import a gun but its not a big deal in the grand scheme of things.