Key thing is to get the shoes clean and dry. Wash the shoes at the hottest possible temperature and let them dry thoroughly. (Use a hair dryer on cool/warm setting carefully if needed). Use an anti fungal laundry rinse such as CANESTEN laundry wash if the problem is persistent.
Don't wear the same shoes two days in a row - with barefoot shoes look at rotating 3 pairs if you can afford it - ideally wash after every use until the problem stops recurring, then wash regularly. With three pairs you can wash one and cycle the other two till the first is dry, then wash another pair. Wear them as little as possible - put them on just before you leave and take them off as soon as you get home and let you feet breath.
Obviously unless you treat your feet properly its all a waste of time.
Ideally, use socks until you have the infection under control.