Sampling from a Gibbs measure with pair interaction by means of PCA