MADRID, Spain (AP) _ After decades of virtual isolation, Spain and Portugal become part of modern Europe this week by joining the Common Market. But it means their populations will face higher prices and new business competition.

Since the establishment in 1957 of the trading bloc formally called the European Economic Community, or EEC, Spaniards and Portuguese have watched from the outside as member states tightened economic and political cooperation with each other, extended mutual aid and built their economies by joint action.

On New Year's Day, the Spaniards and Portuguese will become part of it all, a sign of West European recognition of their political maturity and the fruit of years of complex economic negotiations.

Said Prime Minister Felipe Gonzalez after Spain signed the Common Market treaty June 12: ''For Spain, this means the culmination of a process of overcoming our centuries' old isolation.''

''At last, we are Europeans,'' said a 24-year-old Madrid computer science student, Alfredo Veleiro.

Not only will Spain and Portugal take part in a system of largely tariff- free trade relations, but they will be entitled to participate in European ''political cooperation'' - the coordination of community members' foreign policies. They will also join in community-wide social and cultural programs.

Spain and Portugal formally applied for membership in 1977, shortly after becoming parliamentary democracies. But serious negotiations did not get under way until two years ago.

The economic effect of the new members was hotly debated during the talks, and is still a subject of speculation in the two countries and across Europe.

For other European nations, the potential dangers come from Spain's cheaper agricultural produce, wine and huge fishing fleet. Spain's production of citrus fruit and vegetables equals that of all the other community countries taken together.

As a condition of membership, Spain has agreed to reduce the catch of its fishing fleet, the world's fourth largest, and to cut back on wine production.

For both Spain and Portugal, membership could endanger inefficient businesses and industries that have long been protected by high tariff barriers. These businesses, particularly textile and small manufacturing companies, will face the competition of cheaper products from elsewhere in the community.

Agriculture in Spain and Portugal may also suffer.

''Many of our agricultural and livestock products, such as milk, butter, and beef and pork, will suffer tough competition at home with the products of EEC member countries, whose own markets won't be as open to our products,'' said Jose Maria Giralt, president of Spain's National Confederation of Farmer Associations.

Overall, Portugal, which will be the poorest member of the 12-member EEC with an annual per capita income of $1,853, is expected to gain from membership because it will receive community grants to improve its economy.

But Spain, with an annual per capita income of $3,759, will be a net contributor to Common Market coffers.

Spaniards and Portuguese will also have to pay a value-added tax, known as VAT and required of each member country. VAT is a tax on general consumption, added at each stage of the production of goods or services.

Despite government campaigns in both countries to promote VAT, many Spaniards and Portuguese are convinced they will have to pay dearly for becoming ''true'' Europeans.

In Spain, the tax rates will be 12 percent for most goods, and 6 or 33 percent for others. In Portugal the tax will be 16 percent for most products, and 8 or 30 percent for the remainder. In Portugal, basic foodstuffs including bread will not be taxed. In Spain, where they have never been taxed before, they will fall into the 6 percent category.

Although the Spanish Finance Ministry says price increases should not push inflation up more than two points from the current 8 percent, the private Institute of Economic Studies says the rate of increase will be closer to 4 percent.

Portuguese inflation could be higher than the predicted 14 percent next year because of the VAT.

In a move to offset fears about price rises - and helped by the decline in the U.S. dollar - the Spanish government reduced the price of gasoline Dec. 11 by 6 percent.

Nevertheless, consumers expect many merchants will raise prices and blame it on the new tax. But according to Cesar Brana of the Spanish National Consumers Institute, prices for household appliances, medicine, telephone service and automobiles should actually go down.