Eighteen wickets fell across three madcap sessions on the bouncy Mackay wicket, with Australia limping to 165 for eight at stumps but holding a 101-run lead after blasting out the tourists for 64 in the first innings.
All-rounder Cameron Green was 51 not out, with tailender Nathan Lyon on 10.
The recalled Shoriful celebrated his first five-wicket haul in tests after missing Darwin with a hamstring strain.
With Australia trailing 1-0 in the two-match series and under fire after their stunning nine-wicket defeat in Darwin, Australia captain Pat Cummins won the toss and put his quicks to work on a wicket prepared like a Gabba pitch.
Starc delivered with a brilliant display of swing bowling, taking 6-12, including the first five wickets in 22 balls.
The 36-year-old's masterclass saw Bangladesh bowled out just after lunch, but Najmul Hossain Shanto's men hit back hard on the back of Shoriful, who finished the day with 6-35.
Shoriful blew away Australia's top order, bowling opener Travis Head (22) and out-of-form number three Marnus Labuschagne (4), before trapping Steve Smith lbw for 44, ending a 77-run partnership with Green.
