that’s not how it works.
Shingles, caused by the same varicella zoster virus (poxvirus) which causes chicken pox is a double-stranded DNA virus which gets embedded in our OWN cellular DNA in nerve cell nuclei.
You more than likely got exposed to it as a child as it is SO ubiquitous throughout humans, even a handful of chicken pox can confer SOME immunity. It’s a totally random event which causes the DNA transcription process (looking for another protein code) which incidentally reads the pox virus DNA and turns the neuron into a virus factory, sending them out to the ends of the sensory nerves as shingles.
That's right! Back in the 1950s and 1960s, it was commonly believed that once you got chickenpox, you were immune to the virus for the rest of your life. While it's true that getting chickenpox usually confers long-term immunity, they now know that the varicella-zoster virus remains dormant in the body. In some cases, it can reactivate later in life as shingles. I was born in 1955, and we had parties to ensure everyone got the virus. Today, I have shingles, and I use an expensive cream to help keep me looking less sick...