There isn't a causal mechanistic link between shingles and Alzheimers. We don't know why the Shingrix vaccine reduces incidence of Alzheimers.
(You should very much want to avoid any chance of getting shingles, though; it's a nightmare.)