You don't take the blame on a product you did not make, you share in the the anger that you too are affected by receiving a faulty product that you also paid for with your hard earned money and let them know you are going to work with them, by giving their money back, and taking the issue on with your supplier. Money given back is nothing compared to the bad will it will cause, when they tell everyone they could not be satisfied with you rather than tell everyone about a bad product and how your business is going to pursue it.
I would apologize to the customer , letting him know that if the product is faulty it isn't the store's fault but the manufacturing company. I would let him/her know that I will do my best to refund the money or get him a new one that works and try it for him there. I again would make sure that the customer is happy when they left the store .
First try to make him feel at ease , then listen to what actually has gone wrong and try to convince the customer without being harsh and be polite always with the customer.