We propose a quantum Rabi square model where both the nearest-neighbor and the next-nearest-neighbor photon hopping are allowed among four quantum Rabi systems located at the vertices of a square. By tuning the next-nearest hopping strength, we realize a first-order phase transition between the antiferromagnetic superradiant phase and the frustrated superradiant phase, as well as a second-order phase transition between the normal and the superradiant phases. To understand the emergence of such phases, we show analytically that the effect induced by next-nearest hopping is equivalent to that of an artificial gauge phase. Our findings suggest that the next-nearest-neighbor hopping can serve as an alternative for the gauge phase to realize quantum control in applications of quantum simulation and quantum materials, and that our model represents a basic building block for the frustrated $J_1$-$J_2$ quantum spin model on square lattices.