In principle, every linear code can be used to construct a secret sharing scheme. However, determining the access structure of the scheme is a very difficult problem. In this paper, we study MacDonald codes over the finite non-chain ring Fp + vFp, where p is a prime and v2 = v. We provide a method to construct a class of two-weight linear codes over the ring. Then, we determine the access structure of secret sharing schemes based on these codes.