Please do not eat those pickles. It is definitely safest to throw the jar away, and you should not attempt to taste or even smell them to test if they are fine.
When a sealed jar has a swollen or popped lid, it is a clear sign that gas has built up inside. Under normal conditions, properly canned goods maintain a vacuum seal. If gas accumulates to the point where the metal lid is bloated, it indicates active microbial activity. This happens when bacteria or wild yeasts either survived the processing stage or entered through an imperceptible breach in the seal. As these microorganisms feed on sugars and other components in the brine and cucumbers, they produce carbon dioxide and other gases.
While pickling uses acid to inhibit dangerous pathogens, a failed seal or improper acid balance can permit the growth of harmful bacteria, including Clostridium botulinum or other foodborne pathogens. Botulinum toxin and certain other dangerous bacterial toxins cannot be detected by smell, sight, or taste, which is why relying on a taste test is never worth the risk.
To dispose of the jar safely, place the entire unopened container into a plastic bag, seal it securely, and discard it in your regular outdoor trash so pets or wildlife cannot get into it. Since you just purchased it last week, you can also take a photo of the bloated lid and the receipt to request a refund or exchange from the store or manufacturer.