No it is not possible to pay (or apply for membership) "back in time". So if you are not member/have not been member during last year in your own country (Portugal) it is not possible for you to get Unemployment benefits in case you loose your job. It is possible to transfer your membership-periods/workinghours within EU-countries. And yes, in this case there is the 8 week-rule.
If you want to being eligible for unemployment benefits in Denmark you must start to pay to an danish A-kasse and wait 1 year.
The only exemption to this, is for new graduates. They can get benefits without prior membership.