If you want to prevent squirrels from consuming the peppers in your garden, you could consider spraying capsaicin, but it would be a temporary solution depending on weather conditions that could potentially wash away the solution or whether your peppers are in a shaded area so that the sprayed capsaicin would last much longer.