I voted others...but now that I think of it I get it both from a farm, pet shop and other.
I get my hay from my school, which is a farm (agriculture school)
I use two different brands of pellets (because one is so extremely expensive) one from a pet shop (and they do sell animals...there's only like one or two shops in my area that don't and they don't have this particular brand) the other from a farm shop. (They sell food and equipment for nearly all kinds of animals, farm animals and pets (rodents, rabbits, cats and dogs).