Pakistan have scored 557 runs in the second day of the second and last Test of Dan Cake Series in Mirpur on Thursday.
Azhar Ali hit a double century while Shafiq struck his century.
Bangladesh allrounder Shakib Al Hasan has bowled Pakistan skipper Misbah-ul-Haq in the day's second over.
Pakistan resumed batting with 323 for three on day-2 in their first innings of the second and last test in two-match series.
Earlier on Wednesday, Bangladesh captain Mushfiqur Rahim won the toss and decided to field first on the slightly grassy pitch.
Tigers managed to send back three Pakistan batsmen. However, Yunus Khan and Azhar Ali steered Pakistan to 325 runs after 90-over.
Younis Khan scored 148 runs, his 29th Test ton, and Azhar Ali hit his 8th in Test matches.
Mohammad Shahid was the pick of Bangladesh bowlers, taking two wickets and Taijul Islam bagged another Pakistan wicket.
Bangladesh Team
Tamim Iqbal, Imrul Kayes, Mominul Haque, Mahmudullah, Shakib Al Hasan, Mushfiqur Rahim*†, Soumya Sarkar, Shuvagata Hom, Taijul Islam, Shahadat Hossain, Mohammad Shahid
Pakistan Team
Sami Aslam, Mohammad Hafeez, Azhar Ali, Younis Khan, Misbah-ul-Haq*, Asad Shafiq, Sarfraz Ahmed†, Wahab Riaz, Yasir Shah, Junaid Khan, Imran Khan