Body-worn police cameras have captured the moment a man was shot by police after he allegedly drove at undercover officers and rammed their cars in a McDonald's car park in Melbourne's north-west.

Police say the 36-year-old Ararat man and his passenger, a 36-year-old Stawell woman, were acting suspiciously in the McDonald's car park off Mickleham Road in Tullamarine just after midnight on Friday.

A man was shot by police after he allegedly rammed unmarked police cars in a McDonald's car park. Credit:Joe Armao

Assistant Commissioner Luke Cornelius said local plain-clothed detectives used undercover police cars to surround the pair's silver Toyota Corolla and create a blockade.

As the officers stepped out of their cars to approach the pair, the driver allegedly accelerated directly towards them, ramming the two cars.