The economy functions fine with workers and companies right? Why wouldn't it function with robotic workers and companies?
1. People can own shares in companies that own robots. Those shares will pay dividends (or increase in value etc).
2. The government can tax the profits of the robot run factories. These profits can provide a dividend check to citizens who would hopefully invest wisely in the robot companies.
Rather than work, people's time will be spent trying to figure out which robot companies perform well. You can use a computer program to do it .. which will let you decide if you want to be a risky investor etc. If you want to design robots for extra income, you can do that too.
I didn't say products should be free. People will have to pay for the manufactured goods. Think of it this way -- it's the same as working. Instead of you physically going to work and getting a paycheck. Your robot does it for you.
People who make bad investment choices will be worse off than those who make wiser choices. Hopefully nobody will starve, because government will have enough tax revenue for a welfare scheme that provides the bare essentials.