You just got him, right? Bettas can take a while to adjust to a new home and often won't eat right away.
Although frozen foods may entice him to eat I wouldn't try them if you plan to normally feed him pellets. He might end up liking the frozen foods too much and refuse pellets/flakes. Of course, I feel frozen foods are healthier anyways

.
It's unlikely he can't eat...he probably doesn't want to. How large are the pellets? Bettas prefer small ones...HBH Betta Bites are a great choice for picky bettas since they are really tiny. Or you could crush the pellets you are currently trying. Another food I'd try is Hikari Betta Bio-Gold. Both that and HBH Betta Bites are available at chain petstores and are high quality. Atison's Betta Pro is good too but much harder to find.
Oh, and don't worry just yet. Bettas can go weeks without food. I had a betta go a month without eating anything

. One day he just suddenly decided to eat and he ended up living a long, healthy life.
One last thing...what kind of set-up is he in? Is the tank heated? Bettas are tropical fish and prefer temperatures in the mid to high 70's. If the temperature gets too low they won't eat and will become lethargic. Also, if you have a filter the current may be too strong which could be stressing him further.