In this paper, we study linear codes over ring Rk = 𝔽pm[u1, u2,⋯,uk]/〈ui2$\begin{array}{} u^{2}_{i} \end{array} $ = ui, uiuj = ujui〉 where k ≥ 1 and 1 ≤ i, j ≤ k. We define a Gray map from RkntoFpm2kn$\begin{array}{} R_{k}^n\,\,\text{to}\,\,{\mathbb F}_{p^m}^{2^kn} \end{array} $ and give the generator polynomials of constacyclic codes over Rk. We also study the MacWilliams identities of linear codes over Rk.