No charge repair or replacement
create a sales receipt, list the inventory items used and set the sale prices of each to zero. Click in the sales receipt number box and add a -W (for warranty work) to the receipt number, save. Enter the payment for shipping using a shipping expense account as you usually would. If you want, set a class for shipping-warranty and tag the transaction. I do this so I can report on warranty shipping expense and control those costs somewhat.
You will charge for the repair or replacement
same as above, but enter the sales prices of the items used out of inventory, use a service item for any labor charge, and a shipping item for the pre-paid shipping. Whether you track this with a class is up to you