Accept the fact that shoes get a smell from foot odor, which itself is caused by a bacteria.
Avoid wearing synthetic socks or shoes. Always go for wearing cotton socks. Synthetic socks can’t absorb sweat and thus bacteria creeps up resulting in an unpleasant smell.
Always try to wash your feet with an antibacterial soap, especially before putting on shoes or socks. Dry your feet before wearing shoes and socks. You may also use foot antiperspirant spray.
Air-out your shoes in the Sun. Some people also place them in a freezer to kill the germs and bacteria and hence do away with the odour. But from hygiene point of view, this doesn't seem to be the right thing.
Spread ample amount of (kitty litter) cat litter in the footwear and leave it for the whole night. The contents in the kitty litter will exterminate the germs or bacteria and would also absorb the unpleasant odour. People also use baking soda and dryer sheets to get rid of the smell in their shoes.
You may also use odour eater foot powders to spread inside the shoes. One can also have the option to place odour eater insoles in the shoes. These inserts are all set to absord the odour and smell.