If company X wants to find out information about company Y's online product, is it illegal for X to hire a contractor to pose as a customer using false details? Assuming no documents are signed, has fraud or any other offense been committed if the contractor gains access to non-public information (or to Y's product itself) if company Y would not have provided that access knowing the contractor was affiliated with company X? If so, who is the guilty party?
Online versus brick and mortar does not matter. It sounds like fraud. First, you are knowingly making a false representation of fact, and this is a material fact (that is, it matters to the other party whether you are a customer or not). Your falsehood is intended to get the other part to act on that false representation, and providing this information injures the other party. This article gives an overview of the elements of fraud. Signatures are not required for there to be fraud. It is not illegal to pose as a company's customer: it is illegal do so in order to get something that they would not have otherwise provided.
Before disclosing non-public information, the Second Company would very likely have the contractor/fake-customer sign a legally binding NDA agreement.
The disclosure of the non-public information back to the First Company would be a Breach of Contract.
If the Second Company somehow failed to get an NDA or MOU or other document in place, the fake-customer has no obligations to keep information they learned secret, nor even to represent themselves honestly and transparently.
Contrary to @user6726, I disagree that Fraud is supported.