Shaw, one of three loan signings in the Rotherham side from Sheffield United, lashed a volley into the roof of the net four minutes from time after Forest had failed to clear a free-kick.
Nathan Tyson had earlier given Forest a 34th minute lead when he beat Colin Murdock with pace and power before firing past Gary Montgomery.
Rotherham set the tempo in the first half and could have been four goals ahead before Tyson struck on the break.
Will Hoskins went close on three occasions, having a header cleared off the line before being denied by Paul Gerrard and then seeing a header go over the bar.
Gerrard also denied Shaw when the striker found himself in front of goal with only the keeper to beat. But the striker hit a post and then saw the rebound brilliantly saved by the Forest keeper.
John Mullin was also denied by Gerrard who kept his flying header out. Tyson then struck on the break, reacting quickest to Gary Holt's flick to set up a smash and grab for Megson's team.
Rotherham continued in the same vein in the second half with Hoskins, Shaw and Mullin again denied by Gerrard, before Shaw marked his debut with a terrific equaliser.
Grant Holt threatened a second for Forest but his header was turned away by Montgomery.