Is it a sin to buy things, whether needed or not, on Sundays??
The Commandment refers to doing unnecessary work. It is necessary that you eat, travel to mass, obtain food/clothing/shelter/water. These are all permitted.
Going shopping for fun is not unnecessary, it is relaxing and the point of the sabbath, to break from work and give Glory to God!
Now going to the grocery store and buying 2 weeks of groceries is not necessary, that can be put off a day.