The word thinketh is an archaic verb. We don't normally see verbs conjugated using -eth unless we are reading very old texts.
The text you cited is actually a quote from the book of Proverbs in the Old Testament.
For as he thinketh in his heart, so is he (Prov. 23:7a, King James Version)
More modern translations of the Bible translate this verse in more contemporary language:
For as he thinks in his heart, so is he (Modern English Version)
The proverb is often interpreted as alluding to the fact that our character is largely defined by the thoughts that we have. In the case of this particular proverb, the fuller context is saying that we should not dine with people who are not generous, because their stingy attitudes are part of who they are, and they only offer food begrudgingly:
Do not eat the bread of a selfish man, or desire his delicacies; for as he thinks within himself, so he is. He says to you, “Eat and drink!” But his heart is not with you. (Prov. 23: 6-7, New International Version)
Don’t eat the food of selfish people; don’t be greedy for their fine foods. Selfish people are always worrying about how much the food costs. They tell you, “Eat and drink,”
but they don’t really mean it. (New Century Version)
That little snippet you quoted has been used as the title of a book. From a synopsis on Amazon:
"As a Man Thinketh" is a literary essay by James Allen, published in 1903. It was described by Allen as "...dealing with the power of thought, and particularly with the use and application of thought to happy and beautiful issues."
As for your question about the meaning of "for as", that could be rephrased as "because the way". We might paraphrase the entire sentence like this:
Because the way a person thinks in his heart, that is the way he [truly] is.