In order to answer your question the first thing we need is to consider
what causes your shoes in becoming bad in smell.
Based on this link it states:
Shoe odor is actually caused by the feet, namely, the bacteria that live on human skin. These bacteria in the sweat produced by humans are part of the body’s cooling mechanism.
If you are in a tropical or warm country then this will occur to you most of the time, especially if you are doing much physical activity (e.g. exercising, running, etc.). If this is your case then you can do this
Applying antibacterials to the feet before putting on a pair of shoes can also help kill the bacteria that are on the feet. This is an option for those with particularly bad foot odor or those who are heavy sweaters.
So the question now is what antibacterials can I use, right?
The answer to that is GARLIC!
Based on this article you can rub it in your foot
Ajoene creams and solutions are not available commercially. But some experts recommend simply adding a few finely crushed cloves of garlic to a foot bath and soaking the affected foot for 30 minutes, or mincing a few garlic cloves, mixing the minced garlic with olive oil, and then using a cotton ball to rub some of the solution on the affected area.