The cheapest thing that might be similar to a shopping cart, assuming the intended function is storage space, would be to haul a trailer behind your bike. You can find used bike trailers for cheap over the internet, and could even build a shelter out of it if it has the right design/materials/layout for the task.
The above trailer made use of corrugated plastic, the same material used for election signs. You can ask city governments if they have any election signs they're about to throw in the trash and take them off their hands for free, and now you have free build material.
If that isn't appealing or viable, you could get an inexpensive used adult tricycle with one wheel up front and two in the back, and put a very large basket in the rear and/or front to store stuff.
If you literally are going to take a shopping cart and cut pieces of it apart to weld to a bicycle or tricycle, you will have your work cut out for you. The only useful thing in the shopping cart, IMO, would be the metal basket that all the groceries fit in. Making that work with a normal bicycle, regardless of what layout you choose, will require lots of planning and custom fabrication..
If you did a delta trike configuration with 2 wheels back and one front, you will need a front wheel drive setup similar to many recumbent bikes, making your cost go up, unless you only want only one of the rear wheels driven, and are willing to fabricate custom axles to make it work, or alternatively, can source an already built adult delta trike with rear drive. saving you most of the effort
A two wheeled version of this vehicle can be done, but it will be a pain in the ass to balance, especially during braking, and to keep upright when hauling a heavy load. And you will need to have idlers/pulleys for the chainline to maintain tension, which will require custom fabrication and the purchase of additional chain.
You will NOT be able to use shopping cart wheels for either of these setups unless you want a pothole to cause you to tip over and wreck.
If you scrounge for all the parts and can actually find them for free, and can do your own welding/fabrication, it's going to take at least 50 hours of work to put it together.