Customs fees depend on where you live. They apply to anything you import. You're in France I think? Whenever you buy something from someone outside of France, you have to pay some tax to the French government. Different countries have different rules but the amount depends on how much the item is worth. $40 customs fees does seem excessive for an item that is worth less than $100, so you may want to find out how the customs fee is calculated. Look on French government websites.
Shipping is simply the cost that the mail service charges to get the item from one place to another.
It may be that part of the EU allows you to buy from other European countries without paying customs. If so, you should look for a European seller and see what the price is from them.