The primary impact of Shays' Rebellion on the formation of the Constitution was a more powerful federal government capable of keeping the states in order. The rebellion made delegates fearful of the possibility of the entire country collapsing into anarchy in the absence of a powerful central government.
Shays' Rebellion showed that even Massachusetts, considered an organized republic, could swiftly collapse into rebellion. The delegates tasked with framing and creating the Constitution did their work under the shadow of the rebellion.
Order and the preservation of law were considered the prime motivating factors behind the creation of the Constitution. America was seen as vulnerable and the Constitution gave it form and law.