Jim: Would you like a cup of coffee?
Jane: No thanks.
Jim: Oh, go on, I've made a fresh pot. It's very nice.
Jane: No, really, I'm OK.
Jim: I'll pour you one anyway.
Jane: To be honest, I really hate coffee. Please don't give me a cup!
Peter: Are you going to Sarah's party on Saturday night?
Lucy: I'm not sure. To be honest, I don't get on with some of the other girls who are going.
If you want it to mean "In order to be [considered] an honest person" then you would need to say something like "To be an honest person, you must never tell lies".
Student or Learner