This of course depends on your jurisdiction and how much time you’re willing to put into this, but I’d refuse to pay for shipping either way.
You have a contract with the company, and they didn’t fulfil it, that’s on them. They can’t just send you a defective product and make you pay for (part of) it.
You still have a contract. But I get that it may not be worth the trouble.