We focus on the recognition of RS code in a reverse-engineering communication system, and an algorithm based on spectral statistic is proposed, which makes use of the spectral characteristics of RS code. When there are some codes with errors in the observations, the spectral histogram statistic is computed, which can improve the probability of detection in the noisy environment. Experimental results are given to illustrate the performances of the method which can get a 90% probability of detection of (255, 223) RS code in the presence of 0.5% code error rate.