First I would check with your dentist/doctor to make sure his mouth is healthy.
If it is, the you are probably in a big!!!! power play. He only wants to drink, and you are fussing all over because he won't eat. Is he the middle child?
I think the only way you are going to get him to eat again is to stop giving him milkshakes. That probably sounds too simple and awfully brutal to you. But if he only has food in front of him, he will eventually eat.
At first he will cry and make a big fuss (temper tantrum). Don't give in, stay calm, turn your back on him. Go out side and scream if you must.
He will eat. Children do not starve themselves to death. It might take a couple of days. Start with food that he used to really love. And during this time offer desert. If all he eats is desert so be it. At least he eats.
Whatever method you choose to change his behavior, stay calm and do it consistently until you son's behavior's changes.
Good luck.