Bettas are extremely intelligent and can be trained to do complex tricks.
The first thing you need to do to train your betta is to get a pen light. This will be the equivalent of a clicker when training other animals.
I do all my training in one-week increments. It's a little slow, but it helps really establish one step before moving on to the next.
For the first week, you need to associate the light with a treat. Every time you feed, feed one pellet at a time. Just as the fish eats the food, flash the light (not in their eyes).
Then, the second week, you will change the order and flash first, then drop the food.
The third week, you will flash, and wait until you see the fish looking for the food along the surface of the water before quickly dropping it in.
By the end of the third week, your fish will associate the flash with a treat, and you will be ready to move on to Part 2.
To see this in action, here is a video.