You've at last made it to the final stage in the game. From where you appear, slide under the blocks so you can drop down the shaft. When you reach the bottom of the shaft, head right through the narrow corridor.
Worms will drop from the roof here, so you can defeat them with quick shots and run back and forth to refill your special weapons. When you're ready, go through the gate at the right end of the corridor to fight the final boss.
This battle is a toughie. When you first appear, you'll notice the battle area is totally dark. Immediately, circular bits of energy will start whirling and then fly toward you.
Get good at dodging those bursts, as there will be a lot of them. For a short moment following the bursts, you'll see a flash that shows Dr. Wily's location. Be ready to jump and attack that location with powered up pharaoh shot blasts. As an added bonus, the shot materializes over your head as it is powering up, so you can hit him even if he appears far overhead, and you'll still have a powered up shot in reserve that won't use up any additional special weapon energy.
You'll have to hit him several times in this manner, avoiding his aura shots, until his life meter empties.
Congratulations on defeating the evil doctor yet again! Sit back and enjoy the game's ending and closing credits.