"I had expected nothing less of a total victory" - Napoleon
Napoleon had demanded that an expeditionary force be prepared for the 14th of June, coinciding with his victory at Marengo; subsequently, headed by his brother in law Leclerc, it invaded Portugal the following day. He'd planned for a joint assault, the French following the Douro and capturing Porto, while Godoy and the Spanish would use the Tagus and capture Evora. However, news arrived at French headquarters that Spain was unable to assemble a field army in due time because of lack of coordination and desertion and so a change of plan would be made: Leclerc would follow the Tagus and capture Lisbon immediately.
As the advance began, the Portuguese burnt all that could be useful, evacuated it's citizens, including the royal family onboard a ship headed towards Brazil and allowed for militia to wreck havoc on the French supply lines. The army itself retreated, awaiting promised British support. In London meanwhile, the new theatre brought hope and anger. The invasion was a clear provocation, but neither could Britain assemble an effective army able to resist the French. Thus, with rumours of an non-existent Spanish army, a diversionary landing would be made at Corunna to cut the French supply lines and force a retreat, while the Portuguese were expected to give battle outside Lisbon.
However, Leclerc's rapid advance into Portugal meant that he'd outflanked, and routed their entire army before the month was out, just as the British had landed. On July 2nd, Lisbon had fallen following a brief siege, and Portugal sued for peace. Napoleon had achieved his desired goal, but it would not bring the immediate peace he had arrogantly hoped for; only after intense negotiations, some major concessions and the possibility of a stalemate would each side finally accept peace.
[Author's note] Sorry for the lack of in-depth military analysation, but I'm not a military genius