There's no legitimate way to get truly infinite Bells in Animal Crossing without resorting to a cheat device, so the honest answer is that you can't. But you don't need infinite Bells to get rich.
The classic trick is the money tree: plant a glowing gold spot with a Bell bag buried in it, and there's a chance it grows into a tree that shakes down extra Bells. Combine that with the turnip market, selling high-value fossils and fish, and a bit of daily play, and your wallet fills up nicely without any codes at all.