If you enable "allow creation of records via this relationship" for the contacts table in your company to contacts relationship, you can add additional contacts without any button for it just by entering data directly into fields of the portal. And then the foreign key is entered automatically.
But there's nothing wrong with using the button either. If you stick with the add contact button, have it perform a script similar to this:
Set Variable [$CompID ; value: Company::__pkCompanyID ]
Go To layout [ "Contacts" (Contacts) ]
Set Field [Contacts::_fkCompanyID ; $CompID ]
Go to Layout [Original Layout]