Former England Under-19 player Shaw has taken 19 wickets for Gloucestershire this season, having joined them on a season-long loan deal in February.
The 20-year-old was recalled by Yorkshire in June and made three appearances for the county.
Gloucestershire are fifth in the Division Two table, 26 points behind leaders Essex with one game in hand.
Yorkshire seamer Josh Shaw has returned to County Championship Division Two side Gloucestershire on loan.