Suppose that R=Zp4[u] with u2=p3β and pu=0, where p is a prime and β is a unit in R. Then, R is a local non-chain ring of order p5 with a unique maximal ideal J=(p,u) and a residue field of order p. A linear code C of length N over R is an R-submodule of RN. The purpose of this article is to examine MacWilliams identities and generator matrices for linear codes of length N over R. We first prove that when p≠2, there are precisely two distinct rings with these properties up to isomorphism. However, for p=2, only a single such ring is found. Furthermore, we fully describe the lattice of ideals of R and their orders. We then calculate the generator matrices and MacWilliams relations for the linear codes C over R, illustrated with numerical examples. It is important to address that there are challenges associated with working with linear codes over non-chain rings, as such rings are not principal ideal rings.