Pet shop bettas are often kept in filthy surroundings and can be a host to all kinds of disease by the time you get them. Any new fish I get goes in a beanie.. a half gallon pickle jar works as dose a soda bottle with the top cut off. My imports get salt in the water to increase slime coat and fed a few days with thawed blood worms mixed with metronidazole to get rid of any internal parasites. For the externals they get a 3 day treatment of Proform-C. It takes care of costia and velvet. Even after this they are never allowed in my barracks.
If he went from the pet shop cup to a nice clean tank and is still laying around he is not feeling good. something inside or outside is weakening him. I don't think he looks bloated. Feed what he can consume in a few minutes. Them check back a bit later. You want a slightly rounded look to him.. Not like he ate a marble. If he does not have the rounded look, a few more pellets are ok. My metallics are bottomless pits. i feed NLS grow even to adults and it can take a gazillion to round up the metallics. The reds however only need a few then they are plump. You can not go by someone telling you so many pellets a day is all you should do. You may starve or over feed YOUR fish that way. Let him tell you what he needs.
What would I do with yours? Even with a shift in pH from shop to your tank should not be stressing him out that much. My first thought with bettas is always velvet.. especially with the lower pH you have. Copper and proform-c are both good for that. If you don't plan to breed acriflavin is good too. That stuff stains and makes the males kinda impotent so I never use on breeding stock. You would need to treat in a different container than a tank as it will stain that too. Any betta owner needs to keep on hand something to treat velvet with as a ph or temperature drop can bring it on quick. I ship with copper in the water to prevent velvet from taking advantage of a fish in the stress of shipping. Salt is also good as it increases slime coat. But, can't use it with the P-C. And you have to watch the use of even salt. Costia used to be eradicated with salt but now has salt resistent variations.