If you've had shingles before, can you get shingles again?

Yes. A person can have shingles more than once. His primary care doctor can evaluate to see if there is a weakness in his immune system (or just bad luck, older age, or other bodily stressors) that allowed him to have the first case of shingles. The doctor can give some advice on whether or not the patient should get the shingles vaccine to help prevent a recurrence of shingles.
Yes you can. This is why the shingles vaccine can be given to someone who has had shingles previously.