SANTIAGO, Chile (AP) _ America and Chile signed an agreement Friday that allows U.S. space shuttles to use Chile's Easter Island as an emergency landing site.

The military government approved the eight-year pact over objections by some political groups, intellectuals and ecologists, who claimed it would involve Chile in the U.S.-Soviet nuclear rivalry.

Signing the agreement were Foreign Minister Jaime del Valle and U.S. Ambassador James Theberge.

Negotiations over the use of Easter Island in the South Pacific, 2,500 miles west of Chile's northern coast, had been conducted for several months and drew sharp criticism.

The Chilean Writers Association claimed the plan would draw Chile into President Reagan's ''Star Wars'' space defense program.

Radomiro Tomic, a former ambassador to Washington, said NASA's use of Easter Island would ''put Chile in the nuclear line of fire.'' He contended that U.S. space shuttle navigational gear on the island ''could be used for guiding weapons from nuclear submarines or strategic bombers.''

Theberge and other U.S. officials repeatedly denied the allegations.

A communique issued by the Foreign Ministry after the signing said the pact ''guarantees an entirely peaceful purpose, discarding the possibilities of establishing a military base or installing war equipment on the island.''

Under the agreement, the National Aeronautics and Space Administration may use the island as an emergency landing site only for any of the four space shuttle vehicles it now has - Atlantic, Challenger, Columbia and Discovery. It also can be used only as long as the spacecraft are owned and operated by NASA and the United States.

NASA will be permitted to send some personnel to Easter Island during preparations for a shuttle mission and more specialists, with a maximum of 450, in case of an actual emergency, according to a statement issued by the U.S. Embassy.

It said the United States will compensate Chile for any ecological or other damage caused to the island and will finance the extension and improvement of the runway at the Mataveri Airport.