To be intimate with a foolish friend, is like going to bed with a razor.
Franklin compares close friendship with a foolish person to sleeping beside a razor: the danger may not be deliberate, but it is still real. Someone who consistently shows poor judgement can create problems for those closest to them through careless decisions, indiscretion or reckless behaviour. Intimacy increases exposure because friends often share responsibilities, information and consequences.
The saying does not suggest abandoning people merely because they make mistakes. Its target is persistent foolishness that creates foreseeable risks. Franklin’s broader point is that affection should not replace judgement when choosing close companions. A friend need not intend harm to cause it; poor judgement can be damaging in its own right. The proverb therefore presents friendship as a relationship in which character and prudence matter because another person’s choices can affect one’s own wellbeing.