"If only" is used to express a wish or a regret whereas "only if" talks more of a condition that has to be met
In this sentence, you only like the children if they are well behaved (a condition)
however, you could say "If only you were well behaved, we could go to the museum more often" (expressing a wish that they are more well behaved)