The general idea of behaviorism is:
“Behavior can be described and explained without making ultimate reference to mental events or to internal psychological processes. The sources of behavior are external (in the environment), not internal (in the mind, in the head).” (Source)
Thus, in certain input situations, you can equate a disposition to act with a certain mental state.
For example, if you pursue goal G, not getting wet, and A having an umbrella leads to G, behaviorists would equate the goal G with action A. In other words, if you see somebody having an umbrella, you can claim that they have goal G, without making reference to mental events etc.
The common critic here is that the given person has to know that action A leads to G, which is not guaranteed. Thus, behaviorism has a fatal flaw.