Competitive intelligence is completely legal and is an accepted business practice. However, it is important to note that competitive intelligence must be done with the help of publicly available data. If you steal data from the competitor, it becomes corporate espionage, which is not legal.