Rizwan's unbeaten 171 was his Test best and third century in the format while Shakeel's 141 was equally polished as the duo lifted Pakistan from a precarious 16-3 on Wednesday.
Bangladesh openers Shadman Islam was 12 and Zakir Hasan on 11, negotiating 12 overs of pace without any problem as the Rawalpindi stadium pitch has not assisted bowlers as predicted.
Bangladesh had pushed Pakistan on the backfoot on day one but it was Shakeel who repaired the innings with Saim Ayub (56) through a 98-run fourth wicket stand before another 240 runs were added for the next with Rizwan as Pakistan blunted Bangladesh's attack.
Rizwan, who hit three sixes and 11 boundaries in a 239-ball knock, added a quick 44 with Shaheen Shah Afridi who smacked two sixes and a boundary in a blistering 29 not out.
That allowed Pakistan to declare their first innings 78-minutes after tea.
Bangladesh failed to get a wicket in the first session as Rizwan and Shakeel batted superbly to help Pakistan reach 256-4 at lunch.
Off-spinner Mehidy Hasan Miraz ended Bangladesh's frustrating wait for the wicket, luring Shakeel out of the crease as wicketkeeper Litton Das removed the bails, ending a brilliant 261-ball knock.
Shakeel also scored his third Test century and hit nine boundaries.
Shakeel also survived a freakish run out attempt on 138 when he stepped out of his crease while leaving paceman Hasan Mahmud's delivery, but made it back as Das hit the stumps.
Agha Salman made 19.
Pacers Hasan Mahmud (2-70) and Shoriful Islam (2-77) were the pick of Bangladesh bowlers, while Miraz and Shakib Al Hasan grabbed a wicket each.
Resuming at 158-4, Shakeel and Rizwan added 98 runs in an extended two-hour and 15-minute morning session after play on the first day was delayed by a wet outfield.
Looking for early wickets, Bangladesh skipper Najmul Hossain Shanto used all his bowlers but none could replicate the success achieved on day one.
The two-match series is part of the World Test Championship's third cycle with Pakistan currently sixth and Bangladesh eighth on the nine-team table.