There is no shame in what you have to do to survive. Be it stealing, begging, or prostitution. Whatever will get food in your mouth and a roof over your head.
Geishas are not prostitutes, they are artists and entertainers. They do not have sex with people for money and they never did. You're thinking of oiran, which were high-ranking sex workers during the edo period.