A Fairfax City man who pleaded guilty to committing credit-card fraud with a home computer system that a federal prosecutor said was similar to one in the movie "War Games," was sentenced yesterday to 2 1/2 years in prison.

Richard P. Shanklin, a 30-year-old electronics technician, pleaded guilty last month to defrauding a Springfield man of $2,900 by using the man's credit-card number and other credit information that he obtained by tapping into the computer of the Credit Bureau of Atlanta, a credit history firm.

Assistant U.S. Attorney Loren W. Hershey said Shanklin used the information to buy $2,900 worth of computer equipment from a Charlestown, Mass., firm that billed it to the MasterCard and VISA accounts of Gordon Hui of Springfield.

In exchange for Shanklin's plea, the prosecution dropped 14 other counts against him in which he was charged with using his home computer to obtain private credit information on about 80 persons--including well-known entertainers Cheryl Ladd and Linda Blair--in order to obtain about $50,000 worth of computer and other electronic equipment between last September and April.

The comparison of Shanklin's home computer setup to one depicted in the movie "War Games" came from prosecutor Hershey. In the movie, a teen-ager uses a home computer to gain access to a computer with national security secrets.

Shanklin, who lives at 3406 Brookwood Dr., Fairfax City, obtained the secret access code to the Credit Bureau computer from the J.C. Penney Co., apparently by impersonating a Credit Bureau employe over the telephone, Hershey said.

The indictment against Shanklin said that the equipment he obtained allegedly with other people's credit-card numbers was delivered, usually by United Parcel Service, to a Northern Virginia freight depot or to his home.

U.S. District Judge Richard L. Williams, sitting in Alexandria, ordered Shanklin to serve his sentence at the Butner, N.C., federal prison, where he can receive psychological counseling requested by both Shanklin and his attorney, Hershey said.

"I'm really sorry," Shanklin told the judge. "I hope I get the help I want and need so these things won't happen again."

"I do concede he does have a personal problem," Hershey said after sentencing. "But this guy has a cunning and deceitful intelligence."

Hershey said Shanklin was convicted in 1981 in Alexandria of illegally procuring airline tickets and sentenced to the Butner prison to receive psychiatric counseling. But the facility had no room for him and he served a one-year sentence at a federal prison in Lexington, Ky., Hershey said.